Exercism exercises in JavaScript
To run the tests, you'll need NodeJS and Jasmine. For information about how to install these tools, see the Javascript page.
Inside the project dir, run npm install
to get marked
, then run node .
to start the local server.
git clone
this repo andcd exercism-javascript
to enter it- To view the available exercises and general instructions, run
node .
from the project root directory and visit http://localhost:5000
- To create a solution to an exercise (e.g.
two-fer
), enter theexercises/two-fer
directory and createtwo-fer.js
and runjasmine two-fer.spec.js
as usual. - Before checking in,
- run
make test
- that will create a rot13 version of your solution and then copy it to a temp directory and verify the tests pass git add two-fer.rot13.js
so the obscured solution gets saved- do not commit the solution itself; in fact you may want to
rm two-fer.js
(or addtwo-fer.js
to.gitignore
) once you're done, to keep you from accidentally checking it in
- run
- if you want to decrypt or encrypt spoilers on your own, use this alias:
alias rot13='tr A-Za-z N-ZA-Mn-za-m'
- and use it like e.g.
rot13 < foo.rot13.js > foo.js
The following commands assume that you are in the javascript
directory:
make test
make test-assignment ASSIGNMENT=wordy
npm run lint
[oops, this doesn't work with rot13 yet]
Please see the contributing guide