A JavaScript module for interactive exploration of forecast evaluations.
You'll need to install Node.js and npm. Please see the installation instructions at https://docs.npmjs.com/downloading-and-installing-node-js-and-npm.
You must install the required Node.js packages via:
npm install --save-dev
The dev-example
folder has a minimal working example for local development, based on the flusight-dashboard. To use this example for development, we recommend editing only the src/predevals.js
script, and copying any updates to that script into dev-example
to test changes. This can be achieved with the following commands, starting from the root of the predevals
repository:
cp src/predevals.js dev-example
cd dev-example
python3 -m http.server 8000
Then open the displayed link (typically http://[::]:8000/) in your web browser. As you make changes to src/predevals.js
, copy the updated file into the dev-example
folder and refresh the page in your browser.
We use webpack to package up all dependencies into a single dist/predevals.bundle.js
file for end users. To do so, execute the package.json
build
script via the following command, which will update all files in dist/
.
npm run build
You'll then need to commit and push your updates (including dist/predevals.bundle.js
) to GitHub.
For each version, create a new release of the package on GitHub using vX.Y.Z
for the GitHub tag and release-vX.Y.Z
for the release title. The release is now available for use via jsdelivr
.