First, install Node.js.
Now, clone this repository and run the following in a shell in the checked out folder:
$ npm install
This installs all (development) dependencies in local subfolders. It can be run at any time should the versions in the package.json change.
Simply run:
$ npm test
This tests the library with Chrome which will get started in the background.
Tests can be automatically re-run on file changes. For that, instead start the long-running test runner:
$ npm run karma
Test output will appear in the shell.
A stand-alone browser bundle that exposes the global CovJSON
object can be created with:
$ npm run build
This will build the covjson-reader.{src|min}.js files in the root project folder.
Note that both the ndarray and url-template dependencies are included in the bundle. The covutils dependency has to be imported manually as it is a dependency typically used by more than one library, for example, leaflet-coverage also uses it.
- Raise the version number in package.json.
- If it is a minor or major version change, update the version in README.md.
- Create a semver git tag (
x.y.z
) and push it. - Regenerate documentation at https://doc.esdoc.org.
- Run
npm publish
. - Attach the
covjson-reader.{src|min}.js[.map]
files to the GitHub release.
The last two steps build and publish the package to the npm registry.
The JavaScript Standard Style is used in this project. Conformance can be checked with:
$ npm run style