Skip to content

Commit

Permalink
docs: fix import statements in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmd-azeez authored Oct 16, 2023
1 parent 87f7815 commit 340406c
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 340406c

Please sign in to comment.