-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from extism/docs/fix-getting-started
docs: fix import statements in the README
- Loading branch information
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -198,4 +201,4 @@ We are shipping an embedded kernel in base64 form in plugin.ts. To update it, yo | |
``` | ||
make update-kernel | ||
``` | ||
``` |