Grunt is from the past. Use a script in your package.json now to generate apidoc. This code is broken and won't get fixed.
==========================
Use Grunt to generate a RESTful API Documentation with apiDoc.
npm install grunt-apidoc --save-dev
- Add
grunt.loadNpmTasks('grunt-apidoc');
toGruntfile.js
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.
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/" ]
}
}
}
Please visit the main apiDoc project page on github for help and information.