Generate JSDoc Documentation
JohnRiv opened this issue · comments
Fully comment the code using JSDoc syntax and publish the generated documentation to http://comcast.github.io/Surf-N-Perf/
I'd like to publish it similar to how Polymer does:
Example Source: https://github.com/Polymer/core-ajax/blob/master/core-ajax.html
Example Output: https://www.polymer-project.org/docs/elements/core-elements.html#core-ajax
I haven't looked at how they're doing that yet.
Note that I originally planned to use NDoc syntax and only commented some of the code, so the existing comments will have to be modified appropriately.
OK I finally figured out what we need to modify in #36 to get this ready to merge. Here's the rundown:
- .gitignore - remove the 2 "jaguarjs" lines and under the
## Documentation cache and generated files:
section add/_build/
- .travis.yml - change it to match the
.travis.yml
at https://github.com/JohnRiv/Surf-N-Perf/blob/master/.travis.yml- Also add the
deploy.sh
file from https://github.com/JohnRiv/Surf-N-Perf/blob/master/deploy.sh to the root so the new travisafter_success
command will actually execute
- Also add the
- Gruntfile.js - remove
'jsdoc'
from thewatch
&default
tasks & update the jsdocoptions
to be the following:
{
destination: './_build/docs',
configure: './jsdoc-conf.json',
template: './node_modules/jaguarjs-jsdoc',
private: false
}
- add the
jsdoc-conf.json
file from https://github.com/JohnRiv/Surf-N-Perf/blob/master/jsdoc-conf.json - delete the entire
jaguarjs-jsdoc
directory - add the JSDoc files we need as dependencies by running these commands from the root of your project:
$ npm install jaguarjs-jsdoc --save-dev
$ npm install grunt-jsdoc --save-dev
- ^ that should add a couple lines to your
package.json
's list ofdevDependencies
Before submitting the pull request, run these commands to make sure the documentation generates:
$ grunt jsdoc
$ open _build/docs/index.html
That should open up a webpage with documentation for Surf-N-Perf
You should now have a much smaller Pull Request, containing only edits to:
- .gitignore
- .travis.yml
- Gruntfile.js
- deploy.sh [new file]
- jsdoc-conf.json [new file]
- package.json
If that's the case, send it over! ;-)
Pull Request #44 took care of this