Live data from Hacker News

Gulp.js: The streaming build system

gulpjs.com

31–40 of 53 posts

Re: Gulp.js: The streaming build system

#31

Earlier quoted context omitted.

I have been using Browserify for about 8 months on all my personal and work projects and have really liked it. Since it seems like you have used both what are your thoughts on Webpack and Browserify? I have never used Webpack (and now very little about it), but was wondering if it is worth investigating it?

webpack uber alles. start here : https://github.com/petehunt/webpack-howto

Fancy seeing you in a webpack thread :P

Re: Gulp.js: The streaming build system

#32
post #2

I've been using Gulp for a couple of months now, it's great! It's like Grunt, but faster, and the tasks are written in code, not a giant JSON config file.

Even though they are clearly related, Gulp and Grunt are fulfilling different purposes. You should carefully examined your needs before choosing one over another. I recently switched to Gulp for several projects, and I'm thinking of switching back to Grunt. Gulp lacks of some important features. For instance, it does not allow to sequentially execute tasks: everything is done in parallel. This could for sure be emula…

> it does not allow to sequentially execute tasks: everything is done in parallel

There's a package[1] for Gulp which does exactly that.

[1]: https://www.npmjs.org/package/run-sequence

Re: Gulp.js: The streaming build system

#34
post #18

Earlier quoted context omitted.

I think this is a perfect example of why in 2014 Javascript is harder than ever for someone to learn. I'd love to get your take as someone who seems to be using the latest cool stuff as to how to mitigate that? I personally learned JS circa 2006 in the jQuery era and now I'm in a position where web-minded individuals ask me how to learn JS but they are "10 steps ahead" asking questions like react vs ember, ember vs a…

You can skip. I get that front end stuff can be intimidating. My recommendation is to learn the basics and when it comes to libraries fight the intimidation and take a few minutes to try out new technology when you encounter it. If you find it too hard in those few minutes of actually trying it, don't use it. You can still use script tags if you want. Your site will run just fine. Do what feels comfortable. These too…

I practically live and die by the 5 Minute Rule, and as a counterpoint, I've always found Grunt intuitive, if verbose. In particular, I love that its files API is so flexible. I frequently find myself asking questions that look like "I wonder if I can do this X way", and things just work.

Saying Grunt is "very bad" is harsh and only serves to amplify hyperbole that causes much of the churn around JS tooling.

[edited for a grammar nitpick]

Re: Gulp.js: The streaming build system

#35
post #2

I've been using Gulp for a couple of months now, it's great! It's like Grunt, but faster, and the tasks are written in code, not a giant JSON config file.

The grunt config is javascript, not json. So you can write custom tasks code in your grunt config. For instance, I wrote a custom tag to modify specific pages to inject javascript include statements in HTML pages. There is probably a plugin for that, but I was able to write the code in 15 minutes so I didn't care.

I know it is, but the majority of the tasks are configured in one big hash.

Re: Gulp.js: The streaming build system

#36
post #2

I've been using Gulp for a couple of months now, it's great! It's like Grunt, but faster, and the tasks are written in code, not a giant JSON config file.

Even though they are clearly related, Gulp and Grunt are fulfilling different purposes. You should carefully examined your needs before choosing one over another. I recently switched to Gulp for several projects, and I'm thinking of switching back to Grunt. Gulp lacks of some important features. For instance, it does not allow to sequentially execute tasks: everything is done in parallel. This could for sure be emula…

There are ways, like others have said. There is also a callback system you can use to make things sequential, but last time I looked it wasn't well documented

Re: Gulp.js: The streaming build system

#37
Grunt isn't worse than Gulp. It may take longer to set up, but it is way more powerful if you do it correctly. Maybe Gulp has evolved, but the last time I used it (~4 months ago) it had its fair share of issues. If you're doing simple tasks (uglify all of this folder to this folder) it works well. When I used it there was no simple way to copy files from one dir to another. Instant no for me there.

Re: Gulp.js: The streaming build system

#38

I've switched most of my projects to Gulp from Grunt as I prefer code over config. One thing that I wish Gulp did out of the box though would be not to terminate on errors but rather beep without having to write .on('error', ...) handlers.

This is easily handled with gulp-plumber: http://cameronspear.com/blog/how-to-handle-gulp-watch-errors...

Re: Gulp.js: The streaming build system

#39

I've switched most of my projects to Gulp from Grunt as I prefer code over config. One thing that I wish Gulp did out of the box though would be not to terminate on errors but rather beep without having to write .on('error', ...) handlers.

[deleted]

Re: Gulp.js: The streaming build system

#40
post #35

Earlier quoted context omitted.

The grunt config is javascript, not json. So you can write custom tasks code in your grunt config. For instance, I wrote a custom tag to modify specific pages to inject javascript include statements in HTML pages. There is probably a plugin for that, but I was able to write the code in 15 minutes so I didn't care.

I know it is, but the majority of the tasks are configured in one big hash.

Yeah, but it's also trivially easy to wrap a 3rd party task in your own task and munge the config at run time. (I'll admit that that pattern didn't become apparent to me until after using Grunt for some months, but once I saw you could do that, many things that seemed onerous got easier.)
Post reply on HN