Creates documentation for your source code using Dox
This plugin requires Grunt ~0.4.2
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-dox --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-dox');
In your project's Gruntfile, add a section named dox
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
dox: {
your_target: {
// Target-specific file lists and/or options go here.
options: {
// Task-specific options go here.
},
files: [
// File lists go here
]
}
},
});
Type: String
Default value: 'js'
The language style to use when parsing comments. Current possible values are 'js'
, 'php'
, and '4d'
.
Type: String
Default value: 'md'
The output format for your documentation files. The standard is markdown files, but you can also output HTML or the raw
comment JSON generated by Dox. Current possible values are 'md'
, 'json'
, and 'html
.
In this example, we generate docs for a set of PHP library files. Markdown files will be created in the docs
folder with
the same folder structure as the source files.
grunt.initConfig({
dox: {
myCodez: {
options: {
lang: 'php'
},
files: [
{expand: true, cwd: 'library', src: '**/*', dest: 'docs/', ext: '.md'}
]
}
},
});
grunt.initConfig({
dox: {
methods4D: {
options:{
lang:'4d',
outputAs:'html'
},
files:[
{
expand: true,
cwd: '__structure/ce_source/',
src: '*',
dest:'__docs/',
ext:'.html',
filter:''
}
]
}
}
});
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.
(Nothing yet)