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 for that purpose.
Tests can be automatically re-run on file changes. For that, instead start the long-running test runner:
$ npm run karma
and minimize the browser windows that popped up. Test output will appear in the shell.
A stand-alone browser bundle that exposes the global CoverageREST
object can be created with:
$ npm run build
This will build the coverage-rest-client.{src|min}.js files in the root project folder.
Note that both the jsonld and url-template dependencies are included in the bundle.
- 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
coverage-rest-client.{src|min}.js
files to the GitHub release.
The last two steps build and publish the package to the npm registry. This project is registered on http://www.jsdelivr.com such that on every new npm release, the minified browser bundle is made available automatically on the jsDelivr CDN.
The JavaScript Standard Style is used in this project. Conformance can be checked with:
$ npm run style