Move clear tasks to the task files they relate to.

This commit is contained in:
Jürg Lehni 2016-01-25 11:06:45 +01:00
parent 3a45d36224
commit d09459646d
4 changed files with 33 additions and 47 deletions
gulp/tasks

View file

@ -20,14 +20,22 @@ var docOptions = {
server: 'serverdocs' // Generates the website templates for the online docs
};
Object.keys(docOptions).forEach(function(name) {
gulp.task('docs:' + name, ['clean:docs'], shell.task([
'java -cp jsrun.jar:lib/* JsRun app/run.js -c=conf/' + name + '.conf ' +
'-D="renderMode:' + docOptions[name] + '" ' +
gulp.task('docs', ['docs:local']);
for (var key in docOptions) {
gulp.task('docs:' + key, ['clean:docs:' + key], shell.task([
'java -cp jsrun.jar:lib/* JsRun app/run.js -c=conf/' + key + '.conf ' +
'-D="renderMode:' + docOptions[key] + '" ' +
'-D="version:' + options.version + '"'
], {
cwd: 'gulp/jsdoc'
}));
});
}
gulp.task('docs', ['docs:local']);
for (var key in docOptions) {
gulp.task('clean:docs:' + key, function(callback) {
return del([
'dist/' + docOptions[key] + '/**',
]);
});
}