Skip to content

Commit

Permalink
Create non-module version
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrim-ons committed Mar 22, 2021
1 parent b126866 commit 3b25577
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ The module does not plot the points; you can use any plotting library to do this

## How to use `AccurateBeeswarm`

First, import the module:
First, `npm install accurate-beeswarm-plot` and import the module:

```javascript
import { AccurateBeeswarm } from 'accurate-beeswarm-plot';
```

The [latest release](https://github.com/jtrim-ons/accurate-beeswarm-plot/releases/latest)
has a non-module version of the script
`accurate-beeswarm-plot.nomodule.js` that does not require the `import`
statement.

It is assumed that the data (x) axis of the plot will be horizontal. For
a vertical beeswarm, simply swap x and y axes when plotting.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "accurate-beeswarm-plot",
"version": "1.0.7",
"version": "1.0.8",
"description": "A fast layout algorithm for beeswarm plots",
"main": "dist/accurate-beeswarm-plot.js",
"directories": {
Expand All @@ -11,7 +11,7 @@
"src/*.js"
],
"scripts": {
"build": "rm -rf dist && mkdir dist && cp src/accurate-beeswarm-plot.js dist",
"build": "rm -rf dist && mkdir dist && cp src/accurate-beeswarm-plot.js dist && sed '$ d' src/accurate-beeswarm-plot.js > dist/accurate-beeswarm-plot.nomodule.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down

0 comments on commit 3b25577

Please sign in to comment.