Grunt plugin for the amd-doc documentation generator
This plugin requires Grunt
From the same directory as your Gruntfile, run
npm install grunt-amd-doc
Then add the following line to your Gruntfile:
You can verify that the task is available by running
grunt --help and
checking that "amd-doc" is under "Available tasks".
grunt-amd-doc reads two sections of your config:
amd-doc can contain these properties (example from
'amd-doc':all://Grunt files configuration object to process for documentation//(more: )files:src: 'src/deferreds/**/*.js'options://directory to output generated HTML (default = 'doc/out')out: 'doc/out'//directory to store jsdoc cache (default = 'doc/cache')cache: 'doc/cache'//directory to look for markdown mixins (default = 'doc/mixin')mixin: 'doc/mixin'//github URL where source is available. the file path and line number of//each documented variable will be added to this to make source links.repoview: ''//Array of Type (see tasks/doc/Types.js) objects to transform into links//when used as parameter types, return types, or description namepathstypes:var types = ;//make all built-in types link to their MDN pages'Number' 'String' 'Object' 'Function' 'Array' 'RegExp' 'Boolean'forEachtypespushname: vallink: '' + val;;typespushname: 'Any'link: '';typespushname: 'void'link: '';typespushname: 'Element'link: '';typespushname: 'Constructor'link: '';typespushname: 'jQuery'link: '';typespushname: 'require'link: '';typespush//any name matching this RegExp (with name.search()) will be given//the following linkregexp: /amd-utils\/.*/link: '';return types;
requirejs is a standard r.js configuration
packages (all optional) to
transform file names to AMD module names.
Once these options are in place,
grunt amd-doc will run amd-doc.