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.
- Updated package.json to support Grunt >=1.0.0 (from PR #6)
- Updated package.json and .travis to remove Travis CI build errors/warnings
- Minor code cleaning. Nothing new.
- Documentation added for the multiLineOnly option. See #5 for more details
- Republished version 0.0.7 under 0.0.8 due to an error at the publish time
- Rework options parsing to use grunt's built-in options parsing and fix
outDirlocation. (#4, @ssafejava)
- Bumped version of Docker to 0.2.10
- Bumped version of Docker to 0.2.8
- Upgrade plugin to grunt 0.4.x
- Fixed dev dependency version for contrib-clean (0.3.0)
- Updated the docker version to 0.2.3
- Initial project creation that is working at least for my setup
Copyright (c) 2012 Prevole Licensed under the MIT license.