Skip to content

Commit

Permalink
Merge pull request #17 from extism/docs/fix-getting-started
Browse files Browse the repository at this point in the history
docs: fix import statements in the README
  • Loading branch information
mhmd-azeez authored Oct 16, 2023
2 parents 87f7815 + 340406c commit 467f203
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ npm install @extism/[email protected] --save

This guide should walk you through some of the concepts in Extism and this JS library.

First you should import `createPlugin` and `ExtismPluginOptions` from Extism:
First you should import `createPlugin` from Extism:
```js
// CommonJS
const createPlugin = require("../dist/node/index")
const createPlugin = require("@extism/extism")

// ES Modules
import createPlugin from '../src/deno/mod.ts'
// ES Modules/Typescript
import createPlugin from '@extism/extism';

// Deno
import createPlugin from 'https://raw.githubusercontent.com/extism/js-sdk/main/src/deno/mod.ts';
```

## Creating A Plug-in
Expand Down Expand Up @@ -198,4 +201,4 @@ We are shipping an embedded kernel in base64 form in plugin.ts. To update it, yo
```
make update-kernel
```
```

0 comments on commit 467f203

Please sign in to comment.