jashkenas/docco — pull request #83 by justindujardin (2012-03-15 19:52:08+00:00)
Title: Quick and (not so) dirty tests, command line options, and public API

I love docco, and use it on a regular basis for my projects. I really wished it was a little less 'dirty' without being much more complex. So here are some changes to make that a reality. I've tested them thoroughly, and taken care to document what was changed.

### Goals

1. Keep `docco.coffee` as concise as possible.
2. Add flexibility, with testing to verify that it works as intended.
3. Keep the changes easy-to-review and non-controversial.

### Reviewing

To make sure that these changes are easy to review, I've updated my gh-pages branch to reflect them, and made it easy to run the test suite.

**View the documented source and tests**
http://justindujardin.github.com/docco/

**Run the tests**

git clone git@github.com:justindujardin/docco.git
cd docco/
npm install .
cake build test

### Changes

* Install CoffeeScript, Showdown.js, and Commander.js via NPM package dependencies.
* Add public API so that docco can be require'd and used programatically.
* Add options for output path, jst template, and css file to use.
* Add simple test runner (borrowed from CoffeeScript), and tests for new (and old) functionality.
* Add `pagelet.jst` and `pagelet.css` to the `resources/` directory, and a `README.md` file.
* Add `cmd.coffee` for development use (to invoke docco.coffee) from the command line.
* Update binaries and documentation.