usrz / javascript-grunt-jsdoc-ng

Grunt task to run jsDoc without Java.
4 stars 2 forks source link

Grunt JsDoc NG

This is a very simple wrapper to JSDoc for Grunt, without any need to have Java installed.

Installation and usage

Use NPM to install this:

npm install --save-dev grunt-jsdoc-ng

Load the task as any other Grunt plugin:

grunt.loadNpmTasks('grunt-jsdoc-ng');

And the configure the task normally:

'jsdoc-ng' : {
  'mysubtaskname' : {
    src: ['src/*.js', 'README.md' ],
    dest: 'docs',
    template : 'jsdoc-ng',
    options: {
      // ...
    }
  }
}

The various configuration options are:

Embedded template

While the Angular JS doesn't expose all the functionalities of JSDoc, it's good enough (at least for me) for normal usage.

A couple of extra options can be configured in the templates section of the configuration:

See Gruntfile.js for an example on of how to use them.

Heres a cool tutorial on grunt-tasks.com on how to use this plugin