Check if you have node installed via:
$ node
Otherwise install it from: nodejs.org
Install these via:
$ npm install
All dependencies are located in /node_modules
which is ignored from the repo.
You can view/change the dependencies required by looking in package.json
$ npm start
Then in another terminal window:
$ python -m SimpleHTTPServer
$ npm test
Note that 100% coverage is required to get a passing build which will be run automatically by Codeship.
The coverage will be output in the terminal. You can view more detail (such as the exact code not covered) by opening index.html
inside the coverage
directory.
https://github.com/gotwarlost/istanbul
Code coverage is checked via Istanbul.
The Babel
package babel-plugin-__coverage__
prevents code we have not written from showing up in the Istanbul coverage report.
Browserify allows us to break out code up into modules and have them all bundled together to work in the browser.
https://github.com/babel/babelify
Babel Allows new ES6 syntax to be used.
Combines the Babel js compiler to work with Browserify
https://github.com/substack/watchify
Auto re-compiles any changes you make to the js files automatically for you.
https://facebook.github.io/flux/
"An application architecture for React utilizing a unidirectional data flow."
Essentially it allows us to easily share state between isolated components.
https://karma-runner.github.io
Karma is a test runner we use for running the specs.
It is configured to run the specs in a headless PhantomJS browser.
It also handles Browserify, Babelify and auto-reloading the specs.
Jasmine is the testing framework we use for writing the specs.
https://facebook.github.io/immutable-js/
Immutable js allows the data in the store to be immutable.
This provides an optimisation for React, as it can detect exactly the data that has changed and thus only re-renders the components effected.