Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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();
});
});
}
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();
});
});
}
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"><<< back to documentation</a>'))
.pipe($.replace('', ''))
.pipe(gulp.dest('.'))
.on('end', done);
});
}
</div></div>
document : function(menu, callback) {
docco.document(this.doccoFiles(), this.doccoOptions(), function() {
callback(undefined, menu);
});
},
this.files.forEach(function(file) {
docco.document(task.options({ output: file.dest, args: file.src }), function(){
if(++fdone === flength){
done();
}
});
});
});
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"><<< back to documentation</a>'))
.pipe($.replace('', ''))
.pipe(gulp.dest('.'))
.on('end', done);
});
}
</div></div>