From 3b25577e408cec50256937e1712a89177c049d7a Mon Sep 17 00:00:00 2001 From: James Trimble Date: Mon, 22 Mar 2021 22:04:44 +0000 Subject: [PATCH] Create non-module version --- README.md | 7 ++++++- package.json | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1111b26..79acab0 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 3d968dc..38d5621 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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": {