I have a node script and I want to run a gulp task I have in the same script, how can I call it?
#!/usr/bin/env node
var gulp = require('gulp');
gulp.task('default', function (arg) {
});
// How do I call the task 'default'
最终我找到了方法:
gulp.start('default');
在start
方法中使用数组,以防有人正在寻找一种从搜索引擎运行多个任务的方法。
gulp.start( [ 'task1', 'task2' ] );
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.