Grunt Docker plugin.
Generate your Docker documentation
Install this grunt plugin next to your project's grunt.js gruntfile with:
npm install grunt-docker
Then add this line to your project's
Take a look to this example which shows
grunt-docker in action.
You'll need to install
npm install grunt-docker --save-dev
Then modify your
grunt.js file by adding the following line:
Then add some configuration for the plugin like so:
The default options are:
options:inDir: '.'outDir: 'doc'onlyUpdated: falsecolourScheme: 'default'ignoreHidden: falsesidebarState: trueexclude: falselineNums: falsemultiLineOnly: falsejs:css:extras:
The options provided above are the defaults configured in Docker and correspond to its CLI.
Then just run
grunt docker and enjoy!
Docker itself doesn't quite follow Grunt convention, choosing to instead specify an
If you need to output to more than one directory, define a new task; unfortunately, a single
Docker object is allocated per-task and can only be used for a single output folder.
Grunt-Docker will figure out the correct
outDir property by reading Grunt's interpretation of
files.dest. In most cases, this works fine. If you are having issues with relative paths, use
options.outDir, instead of
If your source files are above the current working directory (starting with
../), you must change
options.inDir, or your docs will end up in the same folder as the source folders. For example, if
src property were
../../src/**/*.js, I would set
By default, Grunt-Docker will use
files.src = "." and
options.outDir = "doc" if they are not
src is used in the call to the doc generation as an
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.
outDirlocation. (#4, @ssafejava)
Copyright (c) 2012 Prevole Licensed under the MIT license.