2
我需要依賴於我的「checkout」任務來等待git pull完成的任務。下面是我嘗試過,但它會在下面的任務,而無需等待結賬......不等待git pull完成的gulp依賴關係
var gulp = require('gulp'), git = require('gulp-git');
gulp.task('checkout', function() {
return git.pull('origin', 'Devel', { cwd: './source' }, function(err) {
if(err) {
gutil.log(err);
}
});
});
gulp.task('lint', ['checkout'], function() {
return gulp.src('./source/static.backyardfruit.com/js/backyardfruit/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
});