grunt-apidoc
About
Use Grunt to generate a RESTful API Documentation with apiDoc.
Installation
npm install grunt-apidoc --save-dev
- Add
grunt.loadNpmTasks('grunt-apidoc');
toGruntfile.js
Configuration
Add the task to your Gruntfile's grunt.initConfig:
apidoc: {
myapp: {
src: "app/",
dest: "apidoc/"
}
}
Use only one src and one dest, apiDoc search in subdirs for files with apidoc-parameters.
Additional options
All apiDoc
options can be used within options-block, see apidoc -h
.
src:
Source files directory.dest:
Destination directory, where the documentation will be created.template:
Directory with the template files.options
includeFilters:
RegEx, which files to parse.[ ".*\\.js$" ]
debug: false
Show Debug Output.log: true
Show Log Output.simulate: false
Simulation, no files will be written.
Example options:
includeFilters
With includeFilters
you can define which files apiDoc should include, default *.js
.
debug Show verbose information.
apidoc: {
myapp: {
src: "app/",
dest: "apidoc/",
options: {
debug: true,
includeFilters: [ ".*\\.js$" ],
excludeFilters: [ "node_modules/" ]
}
}
}
Help
Please visit the main apiDoc project page on github for help and information.