News for hackers. Stuff that matters.
Re:Gulp.js: The streaming build system by bellerocky on Thursday August 21, 2014 @11:57AM (#8207968)
I recently switched to using gulp and webpack (to build react.js) after having used grunt for many years and I would encourage anyone still using grunt to make the switch. All that pain and suffering to get your grunt build to work will not be a problem. Setting up gulp is painless. It just worked. My setup is less, jshint, wepback with react.js and bootstrap.

I encourage people to use webpack for any kind of js building unless you're using browserfy, but you can use browserfy with straight up gulp. You could also replace browserfy with webpack. Webpack will build your require.js (and your commonjs) without need for almond.js if you're making single builds. Setting up require.js with grunt was a nightmare, and a cinch with gulp + webpack. Like it took me an entire day in the past with grunt, and like 5 minutes with gulp and webpack.

Re:Gulp.js: The streaming build system by lbotos on Thursday August 21, 2014 @12:20PM (#8208114)
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 angular, etc. Thoughts? Do they basically have to learn up the chain? I guess what I'm saying is there is a lot of history that I'm not sure can be skipped?

Re:Gulp.js: The streaming build system by bellerocky on Thursday August 21, 2014 @12:27PM (#8208155)
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 tools are supposed to make your life easier, not harder.

Having said that grunt is very bad because it is intimidating even for seasoned front-end programmers, it probably scared a lot of new developers away from even looking at front-end build systems. That's probably a good reason why it should fall off the radar. Thankfully gulp is much easier and I bet if you try it you will find it useful. If you don't, that's OK.

Re:Gulp.js: The streaming build system by mattdawson on Thursday August 21, 2014 @01:11PM (#8208406)
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 by bellerocky on Thursday August 21, 2014 @01:55PM (#8208665)
> Saying Grunt is "very bad" is harsh and only serves to amplify hyperbole that causes much of the churn around JS tooling.

I'm speaking from personal experience and time lost trying to just get things to work so I can focus on building the application, not making a hobby out of building the frontend tooling. What I said may be harsh, but it's the truth. Have you tried gulp?

Re:Gulp.js: The streaming build system by mattdawson on Thursday August 21, 2014 @02:55PM (#8209000)
I have, and I'd even be up for using it on a production project. I'd go so far to say I like it even. But the fact stands that the current project I'm working on has a Gruntfile that just flat out wouldn't work in Gulp - which is a combination of things that I'm doing that don't have an analogue in Grunt, likely mixed with a few that I simply wasn't able to figure out.

If Grunt makes sense on some projects, and Gulp makes sense for others, why the need for all the value judgements? I still stand by the assertion that such claims add nothing to the conversation and muddy the waters for everyone.

Re:Gulp.js: The streaming build system by facepalm on Thursday August 21, 2014 @12:46PM (#8208279)
Personally, for the time being I skip all the build tools and just dump JS files in a folder manually. Maybe once I am up to scratch with all the other JS stuff, I'll take a look at the build tools again.
Re:Gulp.js: The streaming build system by floatboth on Thursday August 21, 2014 @12:59PM (#8208334)
You've been using grunt wrong. It's a task runner, not an asset builder.

I use Grunt to run Broccoli and tests. Broccoli is the best asset tool right now. Trees are so much better than streams or anything else. I even made some Sweet.js macros for making Broccoli files look super neat: https://github.com/myfreeweb/sweetbuild

Re:Gulp.js: The streaming build system by Sean-Der on Thursday August 21, 2014 @12:16PM (#8208094)
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?

Re:Gulp.js: The streaming build system by bellerocky on Thursday August 21, 2014 @12:20PM (#8208116)
Webpack is really easy to use and works very nicely with commonjs/nodejs style `module.exports` and `require` which is how I use it now. The place where it becomes incompatible is with the syntax that webpack adds to require statements. Stuff like `require("css!./file.css");` So you could use webpack to build things you once built with browserify, but if you start using `css!` you can't go back easily.

I prefer webpack just because how easy it is to use and how fast it is. It comes with its own watcher too, but I use gulp watch since I use gulp for building less, not the webpack less loader. I haven't wrapped my head around using `require` statements for less just yet.

Re:Gulp.js: The streaming build system by AdrianRossouw on Thursday August 21, 2014 @12:18PM (#8208100)
webpack uber alles.

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

Re:Gulp.js: The streaming build system by thealphanerd on Thursday August 21, 2014 @01:08PM (#8208393)
Fancy seeing you in a webpack thread :P
Re:Gulp.js: The streaming build system by lumpypua on Thursday August 21, 2014 @01:01PM (#8208349)
+1 on the request for experiences of people who've played with Webpack and Browserify.

Sooo many options, so little time.

Re:Gulp.js: The streaming build system by tieTYT on Thursday August 21, 2014 @06:03PM (#8209885)
I use grunt.js and from my perspective gulp is nice syntactic sugar that solves the same problem. But, it's difficult for me to tell what webpack is for. Granted, I've only skimmed the documentation[1], but I feel like I haven't run into the problems that it's trying to solve. Is this meant for webapps that are hundreds of thousands of lines of code?

[1]: http://webpack.github.io/docs/what-is-webpack.html