Hacking on Annotator
Quick setup for lazy people (on a Mac)
Slower introduction for industrious people (and those on Linux/Windows)
If you wish to develop Annotator, you'll need to have a working installation of Node.js (v0.6.x). Once installed (on most systems Node comes bundled with NPM) you should run the following to install Annotator's development dependencies.
$ npm install .
The Annotator source is found in
dev.html loads the raw development files from
lib/ and can be useful when developing.
The tests are to be found in
test/spec/, and use Jasmine to support a BDD process. You can either run the tests in your browser (using
test/runner.html) or using a PhantomJS console runner (see below).
For inline documentation we use TomDoc. It's a Ruby specification but it also works nicely with CoffeeScript.
There are a number of useful development tools shipped in the
$ ./tools/watch # compiles src/*.coffee files into lib/*.js when they change $ ./tools/test_phantom # runs the test suite with PhantomJS (requires Python and PhantomJS)
Building the packaged version of Annotator requires Avery Pennarun's excellent redo build tool. Instructions on installing redo can be found below:
$ redo # just build everything $ redo help # show available build tasks
If you really can't be bothered to install
redo (you should: it's awesome) you can just run the included minimal
On a Mac
$ brew install redo
$ git clone git://github.com/apenwarr/redo.git $ cd redo && make install