Here is a composed task I don\'t know how to replace it with task dependencies.
...
gulp.task(\'watch\', function () {
var server = function(){
gulp.run(\
source: https://github.com/gulpjs/gulp/issues/755
gulp.start()
was never meant to be a public api nor used. And as stated above in comments, the task management is being replaced in the next release....so gulp.start()
will be breaking.
The true intention of the gulp design is to make regular Javascript functions, and only make the task for calling them.
Example:
function getJsFiles() {
var sourcePaths = [
'./app/scripts/**/*.js',
'!./app/scripts/**/*.spec.js',
'!./app/scripts/app.js'
];
var sources = gulp.src(sourcePaths, { read: false }).pipe(angularFilesort());
return gulp.src('./app/index.html')
.pipe(injector(sources, { ignorePath: 'app', addRootSlash: false }))
.pipe(gulp.dest('./app'));
}
gulp.task('js', function () {
jsStream = getJsFiles();
});