Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.7 KB

CONTRIBUTING.md

File metadata and controls

65 lines (47 loc) · 1.7 KB

Contributing

Developing

To develop this code, you'll need Node and Grunt. Once you have Node installed, you also have the Node package manager, npm. Now you can install the dependencies for this repo:

Once you have Node installed, you also have the Node package manager, npm. Now you can install the dependencies for this repo:

npm install
npm install -g grunt-cli

Tests are written in nodeunit. There are two sets of tests: a set that runs in Node, and a set that runs in the browser or in jsdom. Tests run automatically on git push.

Running the tests

npm test

Browser module tests in jsdom

grunt nodeunit-browser

As of this writing, there are a couple of browser module tests that cannot run in jsdom because of bugs in jsdom. Running them in a real browser is the best source of truth, but for the sake of speed, jsdom is used for automated execution.

Browser module tests in your browser

grunt serve-test

Tests can be viewed at http://localhost:8080.

Node module tests

grunt nodeunit

Use npm link for local development

Development of this project will often be associated with work in another project. To facilitate this, npm provides npm link, allowing the "host" project to reference the scoutfile module on the local filesystem, rather than needing to push changes to a repo every time something is changed. To use it, assuming the root directory of the host project is a sibling of the root directory of this repo, run the following in the host project:

npm link ../scoutfile