Generate the documentation of your projects using YUIDOC
JavaScript Perl Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tasks
test
themes/simpleIndex
.jshintrc
AUTHORS
Gruntfile.js
LICENSE-MIT
README.md
package.json

README.md

grunt-build-docs

Generate the documentation of your projects using YUIDOC

Getting Started

If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:

npm install grunt-build-docs --save-dev

docs task

Run this task with the grunt docs command.

This task is a [multi task][] so any targets, files and options should be specified according to the [multi task][] documentation. [multi task]: https://github.com/gruntjs/grunt/wiki/Configuring-tasks

This plugin is compatible with grunt 0.4.0rc7

Options

Settings mirror YUIDoc config.

Usage examples

First possibility: Create a documentation for each directory

docs: {
    compile: {
        name: "Example",
        description: 'Example Description',
        version: '1.0',
        url: 'http://www.example.com',
        options: {
          outdir: "docs" // path or name of the documentation directory
        },
        files: [{expand: true, flatten: true, cwd: "test/tests", src: "*", dest: "test/tests"}]
    }
}

If you want to create a index page that list and link all the available documentations (Usefull if several parts of your project own a documentation)

options: {
      indexdir: "test/tmp/indexdocs", // Path to the index page
      indextheme: "themes/simpleIndex" // Optional, if you want to use a custom theme
}

Second possibility: Create a commun documentation (Because the dest is the same for all directories)

docs: {
    compile: {
        name: "Example",
        description: 'Example Description',
        version: '1.0',
        url: 'http://www.example.com',
        options: {
          outdir: "../docs"
        },
        files: [{expand: true, flatten: true, cwd: "test/tests", src: "*", dest: "test/tmp"}]
    }
}

All these examples are tested in the plugin, you can see how it works by runnning "grunt test" inside the plugin.

Release History

  • 2013-02-25   v0.4.0rc7   Creation of the plugin, compatible with grunt rc7