Grunt module for using mox( A markdown javascript documentation generator)
Check out the example mox output here
This plugin requires Grunt ~0.4.1
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-mox --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-mox');
In your project's Gruntfile, add a section named mox
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
mox: {
your_target: {
sourceFiles : ['sourceFile1.js','sourceFile2.js'],
options: {
name: "Grunt-Mox",
version:"0.1.0",
template : "default",
outputFile:"outputFile.md",
moxJsonFile : "moxJsonFile.json",
htmlFile : "htmlOutput.html"
}
},
},
})
Type: String | Array
Source file(s) or directories to get documentation from
Type: String
Name of application or project generating documentation for.
Type: String
Version of documentation or application generating documentation for.
Type: String
Default: default
Template used to generate documentation. Can be the path to a custom template or one of the predefined mox templates. See mox documentation for more details.
Type: String
File path to output mox markdown documentation.
Type: String
File path to output dox html documentation.
Type: String
File path to output dox json object. See mox documentation for more details.
In this example, the default mox template will be used to generate documentation for the specfied source files.
grunt.initConfig({
mox: {
your_target: {
sourceFiles:['sourceFile1.js','sourceFile2.js']
options: {
outputFile: 'outputFile.md'
}
},
},
})
In this example, the category mox template will be used to generate documentation for the specfied source files.
grunt.initConfig({
mox: {
your_target: {
sourceFiles:['sourceFile1.js','sourceFile2.js']
options: {
outputFile: 'outputFile.md',
template: 'category'
}
},
},
})
In this example, a custom jade template will be used to generate documentation for the specfied source files.
grunt.initConfig({
mox: {
your_target: {
sourceFiles:['sourceFile1.js','sourceFile2.js']
options: {
outputFile: 'outputFile.md',
template: 'someCustomTemplate.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](http://gruntjs.com/).