标签:failed default ack top ade int 时间间隔 缓冲 err
gulp.src(‘client/templates/*.jade‘)
.pipe(jade())
.pipe(minify())
.pipe(gulp.dest(‘build/minified_templates‘));
gulp.src(‘client/js/**/*.js‘) // 匹配‘client/js/somedir/somefile.js‘ 并且自动设置 `base` 为 `client/js/`
.pipe(minify())
.pipe(gulp.dest(‘build‘)); // 写入 ‘build/somedir/somefile.js‘ gulp.src(‘client/js/**/*.js‘, { base:‘client‘ }) // 制定base 为‘client‘
.pipe(minify())
.pipe(gulp.dest(‘build‘)); // 写入 ‘build/js/somedir/somefile.js‘
gulp.task(‘buildStuff‘, function() {
// Do something that "builds stuff"
var stream = gulp.src(/*some source path*/)
.pipe(somePlugin())
.pipe(someOtherPlugin())
.pipe(gulp.dest(/*some destination*/));
return stream;
});
var gulp = require(‘gulp‘);
// 注意fn有一个回调参数,所以当任务完成的时候,会调用这个cb,进程就会知道该任务完成了
gulp.task(‘one‘, function(cb) {
// do stuff -- async or otherwise
cb(err); // if err is not null and not undefined, the run will stop, and note that it failed
});
// 申明了一个任务two,必须在one完成之后才能执行
gulp.task(‘two‘, [‘one‘], function() {
// task ‘one‘ is done now
});
//默认我们是申明要执行两个任务,这两个任务会同时初始化,但是任务two会因为有依赖延迟执行
gulp.task(‘default‘, [‘one‘, ‘two‘]);
added
, changed
或者deleted
.标签:failed default ack top ade int 时间间隔 缓冲 err
原文地址:http://www.cnblogs.com/kmweb/p/6497553.html