Skip to content

Doxx grunt plugin automatically generates the documentation for your project.

Notifications You must be signed in to change notification settings

evertton/grunt-mrdoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-mrdoc

Mr. Doc grunt plugin automatically generates the documentation for your project.

Getting Started

This plugin requires Grunt ~0.4.5

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-mrdoc --save-dev

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

grunt.loadNpmTasks('grunt-mrdoc');

The "mrdoc" task

Overview

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

grunt.initConfig({
  mrdoc: {
    all: {
      src: 'src',
      target: 'docs',
      options: {
        // Task-specific options go here.
      }
    }
  },
});

Options

options.ignore

Type: String Default value: 'test,public,static,views,templates'

A comma separated list of directories to ignore.

options.title

Type: String Default value: ''

The title for produced page.

options.target_extension

Type: String Default value: 'html'

Target files extension.

options.template

Type: String Default value:

The jade template file to use.

options.theme

Type: String Default value:

The theme to use.

options.readme

Type: String Default value: 'README.md'

The markdown file to use on the main page of the documentations.

Usage Examples

Default Options

In this example, the default options are used to automatically generates documentation of files in src directory. The generated documentation is saved in target directory docs.

grunt.initConfig({
  mrdoc: {
    all: {
      src: 'src',
      target: 'docs'
    }
  },
});

Custom Options

In this example, the custom options are used to change title and template of documentation page. The ignore option is used to prevent the documents generation for files in the directories: examples and vendors.

grunt.initConfig({
  mrdoc: {
    custom: {
      src: 'src',
      target: 'docs',
      options: {
        title: 'Mr. Doc',
        ignore: 'examples,vendors',
        template: 'templates/mrdoc.jade'
      },
    }
  },
});

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • 0.1.9: Fix path to mr-doc dep
  • 0.1.5: Fix path to locate deps
  • 0.1.4: Migrate for Mr. Doc
  • 0.1.3: Adds support for theme
  • 0.1.0: Initial release

License

Copyright (c) 2014-2015 Evertton de Lima. Licensed under the MIT license.

About

Doxx grunt plugin automatically generates the documentation for your project.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •