Skip to content

Commit

Permalink
Added simple node example to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rshaker committed May 6, 2024
1 parent 8a20b9f commit 471e0e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Added simple node example to README.md

## [0.3.2] - 2024-04-29

### Publish
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ The following examples show how to inject the plugin into a Blockly workspace.
### Using node:

```js
TBW
import * as Blockly from "blockly/core";
import { MultiselectPlugin } from "@rshaker/multiselect-blockly";

const plugin = new MultiselectPlugin({}, workspace);
plugin.init();
```

See [test/workspace/index.ts](test/workspace/index.ts) for another node example, the live demo is [here](https://rshaker.github.io/multiselect-blockly/test/workspace).
See [test/workspace/index.ts](https://github.com/rshaker/multiselect-blockly/blob/main/test/workspace/index.ts) for a more comprehensive example, the live demo is [here](https://rshaker.github.io/multiselect-blockly/test/workspace).

### Using a browser:

Expand Down Expand Up @@ -76,6 +80,7 @@ See [test/workspace/index.ts](test/workspace/index.ts) for another node example,
}
document.addEventListener("DOMContentLoaded", function () {
// Define a simple toolbox
const toolbox = {
kind: "flyoutToolbox",
contents: [
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"sourceMap": true
},
}
// "include": ["src/**/*", "tests/**/*"]
}

0 comments on commit 471e0e6

Please sign in to comment.