NickQiZhu/dc.js — pull request #301 by jrideout (2013-09-24 03:21:42+00:00)
Title: Build docs from source

This patch does the following:

* Migrates the primary location of documentation to /** **/ blocks within the codebase. Take a look at [gist jrideout/6679959](https://gist.github.com/jrideout/6679959) for the migration code. This plus some manual tweaking did the trick.
* Adds a new `grunt docs` command to build the docs using [emu](https://github.com/puffnfresh/emu.js)
* builds a sourcemap for dc.js
* places the docs in web/docs - where they can live after we delete the wiki page
* moves the banner/footer creation from Gruntfile templates to files in src/ (to allow for the sourcemap, and to allow source code parser tools such as esprima to take them into account.

We still need to review the following:

- [ ] To create some better styling
- [ ] The order changed for many of the methods. Does that matter?
- [ ] It might make more sense to call the non-chart functions mixins and describe the charts in those terms

Eventually (in another PR) we probably want to use something more like jsdoc rather than emu. I've been playing with esprima/escodegen to dynamically associate the docs with the functions at runtime (during the build) so that we can list all the methods for each charts, including inheritance. I'd also like to add a function coverage test for any externally accessible method.

Fixes #270