This package has been deprecated

Author message:

This is an experimental fork. Better not to use it for anything serious.

grunt-docco3

0.2.2 • Public • Published

grunt-docco3

This is a grunt plugin which uses docco to create HTML documents that displays your comments intermingled with your code.

I got the idea for this plugin from David Souther but his version did not work for me and grunt 0.4.

Getting Started

This plugin requires Grunt ~0.4

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, you may install this plugin with this command:

npm install grunt-docco2

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-docco2');

The "docco" task

Overview

In your project's Gruntfile, add a section named docco to the data object passed into grunt.initConfig().

grunt.initConfig({
  docco: {
    src: [],
    options: {
        output: 'docs'
    }
  }
})

Usage Examples

This example uses this pattern public/js/**/*.js to get your code files. In this case public/js/libs should be excluded from docco.

If you are not sure about the pattern and how you should define the src array, read more about the Files Array Format.

module.exports = function(grunt) {
 
    // Project configuration.
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        docco: {
            docs: {
                src: ['public/js/**/*.js', '!public/js/libs/*.js', '!public/js/libs/**/*.js'],
                options: {
                    output: 'docs/annotated-source'
                }
            }
        }
    });
 
    // Load tasks
    grunt.loadNpmTasks('grunt-docco2');
 
    // Default task(s)
    grunt.registerTask('default', ['docco']);
 
};
 

Release History

  • 17-09-2013 0.2.0 Forked & simplified, fixed some issues.

Readme

Keywords

Package Sidebar

Install

npm i grunt-docco3

Weekly Downloads

1

Version

0.2.2

License

none

Last publish

Collaborators

  • mgol