-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
By what should I replace gulp.run ? #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Questions are better suited for StackOverflow. But you can use |
On your way to stack overflow, try one of these:
|
@sindresorhus Do you intend for |
This is an issue of bad code organization, not something to do with .start(). You want something like this: function reload() {
server.changed('SpecRunner.html');
}
gulp.task('watch', function() {
gulp.src(paths.coffee)
.pipe(watch(function(files) {
return files.pipe(coffee())
.pipe(gulp.dest(paths.js))
.once('end', reload);
}));
gulp.src(paths.stylus)
.pipe(watch(function(files) {
return gulp.src(paths.mainStylus)
.pipe(stylus())
.pipe(gulp.dest(paths.css))
.once('end', reload);
}))
}); |
I see
is going to make |
@dman777 Here is my answer: don't use .start, you don't need it. It's an internal function used by the CLI. It doesn't need to be deprecated because it is already undocumented and marked as internal. It has been since version 1.0 almost a year ago. Named functions work perfectly fine. There is no reason to make something a task unless you intend to call it from the CLI. Even if you need to call it from the CLI, you can still use named functions. Repeat after me: Use functions. You don't need .start(). |
The 4.0 branch already has start removed. Did i mention you should start using the 4.0 branch and submit issues for us so we can ship it? |
👍 |
Hi I have the following tasks:
How should I in that sample, replace the run method which is currently deprecated ?
The text was updated successfully, but these errors were encountered: