Hacker News new | ask | show | jobs
by jessaustin 4122 days ago
...I would like the task system to provide an abstraction for pipelining tasks. (Perhaps gulp helps with this?)

Hmmm, perhaps someone needs to look at any gulpfile ever written, anywhere.

   gulp.src('src')
     .pipe(this())
     .pipe(that());
Maybe it's frustrating for anyone who spent "18 months" hacking grunt, but gulp really is better. Both tools are built on node for Pete's sake; async really shouldn't be that hard.
3 comments

There is also the 'scripts' section of your package.json, 'npm run', and UNIX pipes:

    scripts: {
      "do_something": "this | that"
    }

   $ npm run do_something
See also http://blog.keithcirkel.co.uk/why-we-should-stop-using-grunt...
Yes while gulp > grunt, in many cases npm by itself is what you want. gulp.watch(), in particular, seems more difficult to use than the watch facility built into many (but not all) node modules. Also something like Browserify must be somewhat shoehorned into gulp. It might be worth it to look at what gulp has that npm run is missing? Maybe it doesn't need to worry about streaming files, but the notion of some tasks depending on arbitrary sets of other tasks (a generalization of npm's "pre-" and "post-") seems pretty handy.
I am excited to look into gulp!
yes I found gulp to be more easy to implement than grunt. Maybe I haven't mastered grunt but I am happy with gulp.