Skip to content
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

gulp watch -> task setup #76

Closed
yocontra opened this issue Dec 29, 2013 · 5 comments
Closed

gulp watch -> task setup #76

yocontra opened this issue Dec 29, 2013 · 5 comments

Comments

@yocontra
Copy link
Member

It seems like 90% of the time people are simply saying "watch this glob and run this task when it changes".

Right now this code can get pretty long and verbose (https://gist.github.com/Sigmus/8171005)

I'm not sure exactly what the syntax should look like but we need a glob->run task sugar util.

Possible option is having .watch take an object where the key is the task name and the value is the glob or array of globs that trigger it. Could also go the other way around.

https://gist.github.com/Contra/8175813

@dashed
Copy link
Contributor

dashed commented Dec 29, 2013

For this pattern, at least from what I see in this gulpfile, it seems that for some tasks, it's efficient to run task on individually changed files instead of the entire glob'd target. Is this possible?

This is one of the reasons why I opted for gulp since this was cumbersome to do in grunt.

@yocontra
Copy link
Member Author

@dashed #13 is tricky to implement correctly though

@ajoslin
Copy link
Contributor

ajoslin commented Dec 30, 2013

I think at the very least it could be gulp.watch(glob[, tasksToRun...][, cb])

@floatdrop
Copy link
Contributor

Is it out dated? Since we have now gulp-watch - those gists can be written like this: https://gist.github.com/floatdrop/8262616

@yocontra
Copy link
Member Author

yocontra commented Jan 5, 2014

Yep - use gulp-watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants