How to use the docco.document function in docco

To help you get started, we’ve selected a few docco examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github canjs / canjs / build / tasks / docco.js View on Github external
var options = grunt.config(['docco', this.target]);
		var defaults = _.extend({
			exclude : [/\.min\./]
		}, grunt.config('strip')._options);
		grunt.verbose.writeflags(options, 'Options');
		var done = this.async();
		var src = grunt.file.expandFiles(this.file.src).filter(function(file) {
			for(var i = 0; i < defaults.exclude.length; i++) {
				if(defaults.exclude[i].test(file)) {
					return false;
				}
			}
			return true;
		});

		docco.document(src, options.docco || {}, function(err, result, code){
			grunt.log.writeln("Doccoed [" + src.join(", ") + "]; " + err ? err : "(No errors)" + "\n" + result + " " + code);
			done();
		});
	});
}
github donejs / donejs / build / tasks / docco.js View on Github external
var options = grunt.config.process(['docco', this.target]);
		var defaults = _.extend({
			exclude : [/\.min\./]
		}, grunt.config.process('docco')._options);
		grunt.verbose.writeflags(options, 'Options');
		var done = this.async();
		var src = grunt.file.expandFiles(this.file.src).filter(function(file) {
			for(var i = 0; i < defaults.exclude.length; i++) {
				if(defaults.exclude[i].test(file)) {
					return false;
				}
			}
			return true;
		});

		docco.document(src, _.extend({}, defaults.docco, options.docco) || {}, function(err, result, code){
			grunt.log.writeln("Doccoed [" + src.join(", ") + "]; " + err ? err : "(No errors)" + "\n" + result + " " + code);
			done();
		});
	});
}
github jilieryuyi / wing-binlog / web / vendors / parsleyjs / gulpfile.babel.js View on Github external
function buildDoc(done) {
  var dest = 'doc/annotated-source/';
  var sources = glob.sync('src/parsley/*.js');
  del.sync([dest + '*']);
  docco.document({
    layout: 'parallel',
    output: dest,
    args: sources
  }, function() {
      gulp.src(dest + '*.html', { base: "./" })
      .pipe($.replace('<div id="jump_page">', '<div id="jump_page"><a href="../index.html" class="source">&lt;&lt;&lt; back to documentation</a>'))
      .pipe($.replace('', ''))
      .pipe(gulp.dest('.'))
      .on('end', done);
  });
}

</div></div>
github AlphaHydrae / docco-central / lib / generator.js View on Github external
document : function(menu, callback) {
    docco.document(this.doccoFiles(), this.doccoOptions(), function() {
      callback(undefined, menu);
    });
  },
github stackfull / angular-virtual-scroll / Gruntfile.js View on Github external
this.files.forEach(function(file) {
        docco.document(task.options({ output: file.dest, args: file.src }), function(){
          if(++fdone === flength){
            done();
          }
        });
      });
    });
github guillaumepotier / Parsley.js / gulpfile.babel.js View on Github external
function buildDoc(done) {
  var dest = 'doc/annotated-source/';
  var sources = glob.sync('src/parsley/*.js');
  del.sync([dest + '*']);
  docco.document({
    layout: 'parallel',
    output: dest,
    args: sources
  }, function() {
      gulp.src(dest + '*.html', { base: "./" })
      .pipe($.replace('<div id="jump_page">', '<div id="jump_page"><a href="../index.html" class="source">&lt;&lt;&lt; back to documentation</a>'))
      .pipe($.replace('', ''))
      .pipe(gulp.dest('.'))
      .on('end', done);
  });
}
</div></div>

docco

The Quick and Dirty Literate Programming Documentation Generator

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular docco functions