Skip to content

Instantly share code, notes, and snippets.

@there4
Created May 24, 2012 14:51
Show Gist options
  • Save there4/2782010 to your computer and use it in GitHub Desktop.
Save there4/2782010 to your computer and use it in GitHub Desktop.
Docco Grunt Task File
var fs = require('fs'),
path = require('path');
module.exports = function(grunt) {
grunt.task.registerMultiTask('docco', 'build the help files', function() {
var
name = this.target,
data = this.data,
src = path.resolve(this.data.src),
out = path.resolve(this.data.dest),
cb = this.async(),
files = grunt.file.expand(src),
docco;
// Let the user where we are writing to
grunt.verbose.or.write('Writing docs to .' + out.replace(process.cwd(), '') + '...');
process.ARGV = files;
docco = require('docco');
grunt.verbose.or.ok();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment