Skip to content

gulp watch -> task setup #76

Closed
Closed

Description

@yocontra

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

Activity

  1. dashed commented on Dec 29, 2013

    @dashed
    Contributor

    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.

  2. yocontra commented on Dec 29, 2013

    @yocontra
    MemberAuthor

    @dashed #13 is tricky to implement correctly though

  3. ajoslin commented on Dec 30, 2013

    @ajoslin
    Contributor

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

  4. floatdrop commented on Jan 5, 2014

    @floatdrop
    Contributor

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

  5. yocontra commented on Jan 5, 2014

    @yocontra
    MemberAuthor

    Yep - use gulp-watch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions