grunt

  • function
DocumentJS.apis.generate.grunt  

Run the DocumentJS Grunt task.

grunt documentjs[:NAME[@PATH]]

Calls the configured grunt task.

If no name or path is given, all versions and sites will be generated.

If no documentjs task is configured, the grunt task will read from a local documentjs.json.

Parameters

  1. NAME {String}Optional

    The name of a version or site that this generation will be limited too.

  2. PATH {String}Optional

    The path to the location of a local repository to stand-in for the version specified by name.

Examples

Given a Gruntfile.js like:

module.exports = function(grunt){
  grunt.loadNpmTasks('documentjs');
  grunt.initConfig({
    documentjs: {
      versions: {
        "1.0" : "...",
        "1.1" : "...",
        "2.0" : "..."
      },
      sites: {
        "pages" : { ... }  
      },
      ...
    }
  });
};

Generate all versions and sites like:

> grunt documentjs

Generate the "pages" site like:

> grunt documentjs:pages

Generate the 1.0 docs like:

> grunt documentjs:1.0

Generate the 1.0 docs from a local project like:

> grunt documentjs:1.0@../local