55
gulpfile.js
55
gulpfile.js
@ -399,3 +399,58 @@ gulp.task('build', function(done) {
|
||||
gulp.task('analyze', function(done) {
|
||||
runSequence('analyze/analyzer.dart');
|
||||
});
|
||||
|
||||
|
||||
// --------------
|
||||
// doc generation
|
||||
var Dgeni = require('dgeni');
|
||||
gulp.task('docs/dgeni', function() {
|
||||
try {
|
||||
var dgeni = new Dgeni([require('./docs/dgeni-package')]);
|
||||
return dgeni.generate();
|
||||
} catch(x) {
|
||||
console.log(x.stack);
|
||||
throw x;
|
||||
}
|
||||
});
|
||||
|
||||
var bower = require('bower');
|
||||
gulp.task('docs/bower', function() {
|
||||
var bowerTask = bower.commands.install(undefined, undefined, { cwd: 'docs' });
|
||||
bowerTask.on('log', function (result) {
|
||||
console.log('bower:', result.id, result.data.endpoint.name);
|
||||
});
|
||||
bowerTask.on('error', function(error) {
|
||||
console.log(error);
|
||||
});
|
||||
return bowerTask;
|
||||
});
|
||||
|
||||
gulp.task('docs/assets', ['docs/bower'], function() {
|
||||
return gulp.src('docs/bower_components/**/*')
|
||||
.pipe(gulp.dest('build/docs/lib'));
|
||||
});
|
||||
|
||||
gulp.task('docs/app', function() {
|
||||
return gulp.src('docs/app/**/*')
|
||||
.pipe(gulp.dest('build/docs'));
|
||||
});
|
||||
|
||||
gulp.task('docs', ['docs/assets', 'docs/app', 'docs/dgeni']);
|
||||
gulp.task('docs-watch', function() {
|
||||
return gulp.watch('docs/app/**/*', ['docs-app']);
|
||||
});
|
||||
|
||||
var jasmine = require('gulp-jasmine');
|
||||
gulp.task('docs/test', function () {
|
||||
return gulp.src('docs/**/*.spec.js')
|
||||
.pipe(jasmine());
|
||||
});
|
||||
|
||||
var webserver = require('gulp-webserver');
|
||||
gulp.task('docs/serve', function() {
|
||||
gulp.src('build/docs/')
|
||||
.pipe(webserver({
|
||||
fallback: 'index.html'
|
||||
}));
|
||||
});
|
||||
|
Reference in New Issue
Block a user