Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@
> Example plugin for the
> [dynamic-plugin-framework](https://github.com/flowscripter/dynamic-plugin-framework)

## Bun Module Usage

Add the module:

`bun add @flowscripter/example-plugin`
## Bundled Bun Module Usage

Use the module:

```typescript
import { ExampleExtension } from "@flowscripter/example-plugin";
import { ExampleExtension } from "";
import { ExampleExtension } from "https://unpkg.com/@flowscripter/example-plugin/dist/bundle.js";

const extension = new ExampleExtension();

Expand All @@ -35,6 +32,12 @@ Test:

`bun test`

Bundle for usage as a
[dynamic-plugin-framework](https://github.com/flowscripter/dynamic-plugin-framework)
plugin:

`bun build index.ts --outdir ./dist --entry-naming bundle.js --minify`

**NOTE**: The following tasks use Deno as it excels at these and Bun does not
currently provide such functionality:

Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@
"dynamic",
"import"
],
"module": "index.ts",
"module": "dist/bundle.js",
"type": "module",
"version": "1.0.7",
"exports": "./dist/bundle.js",
"files": [
"dist/",
"README.md",
"LICENSE"
],
"publishConfig": {
"access": "public"
},
Expand Down