You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
579 B

  1. // grunt-docco
  2. // https://github.com/DavidSouther/grunt-docco
  3. //
  4. // Copyright (c) 2012 David Souther
  5. // Licensed under the MIT license.
  6. "use strict";
  7. var docco = require('docco');
  8. module.exports = function(grunt) {
  9. grunt.registerMultiTask('docco', 'Docco processor.', function() {
  10. var task = this,
  11. fdone = 0,
  12. flength = this.files.length,
  13. done = this.async();
  14. this.files.forEach(function(file) {
  15. docco.document(file.src, task.options({ output: file.dest }), function(){
  16. if(++fdone === flength) done();
  17. });
  18. });
  19. });
  20. };