Live data from Hacker News

Grunt 1.0.0 released

gruntjs.com

21–30 of 106 posts

Re: Grunt 1.0.0 released

#21
post #4

Earlier quoted context omitted.

until the new shiny thing comes and replaces that. I still don't understand what's wrong with grunt (or whats better with gulp).

I have large project built with Grunt and at one point I have tried to move it to Gulp. Gulp, as far as I can tell, requires much less code to do the same stuff. However, two things forced me to stick with Grunt. 1) The build scripts were working just fine. Why fix something it ain't broken? :) 2) When Sass or Coffee fails, gulp watch fails entirely. It's something I wasn't able to solve. Grunt will just pick up from…

for less it's a pretty easy fix: .pipe(less()) .on("error", function (err) { console.log(err); this.emit("end"); })

I presume, something similar will work for sass too.

Re: Grunt 1.0.0 released

#22
post #4

Earlier quoted context omitted.

until the new shiny thing comes and replaces that. I still don't understand what's wrong with grunt (or whats better with gulp).

I never got what's so great about Grunt in the first place, and instead stuck to makefiles. Something like `cat src/*.js | uglify > build.js` would take me a lot more effort to do with Grunt (or Gulp).

With gulp;

    var gulp = require('gulp'),
        concat = require('gulp-concat'),
        uglify = require('gulp-uglify');

    gulp.task('js', function(){
        return gulp.src(['src/**/*.js'])
            .pipe(concat('build.js'))
            .pipe(uglify())
            .pipe(gulp.dest('.'));
    });

    gulp.task('default', ['js']);

With grunt;

    module.exports = function (grunt) {
        grunt.initConfig({

            concat: {
                js: {
                    files: {'build.js': 'src/**/*.js' }
                }
            },
 
            uglify: {
                bundle: {
                    files: {'build.min.js': 'bundle.js'}
                }
            }
        });
The bash script is easier for such a trivial job. Gulp and Grunt aren't better if that's all you're doing. They come in to their own when you have a large number of tasks to run. But even then, if you (and your team) prefer make then it's better to use make.

Re: Grunt 1.0.0 released

#23
post #4

Earlier quoted context omitted.

until the new shiny thing comes and replaces that. I still don't understand what's wrong with grunt (or whats better with gulp).

I never got what's so great about Grunt in the first place, and instead stuck to makefiles. Something like `cat src/*.js | uglify > build.js` would take me a lot more effort to do with Grunt (or Gulp).

It does seem overly complicated, for what ends up usually being not much more than a makefile or even a simple batch script.

We haven't quite come out of the cycle where everything that we already had has to be half-implemented a dozen times in JavaScript/Node...

Re: Grunt 1.0.0 released

#24
post #17
post #9

Obsolete before it hit 1.0. While grunt/gulp was fun for a while... i am not looking back to our 800 line grunt file, complicated async configuration and the tons of dev-dependencies. Webpack blew everything out of the water. 80 lines of config, hot-reloading, code-spliting, hash-filenames... Looking forward to whats coming next.

One thing this dissuaded me from webpack is that it markets itself on support for AMD and script tags - if you need JS modules that are only available as AMD or script tags in 2016 it's a worry. That said, I use gulp now and a notice lot of gulp seems to be replicating parts of JS itself - tasks are just functions, I don't see why they need to be special. There's always 'gulp foo' which is a less maintained wrapper a…

[deleted]

Re: Grunt 1.0.0 released

#25
I spent a minute scanning that website and I still don't know what it does. Is it that hard to have a link along the top leading to an ELI5 blurb

Re: Grunt 1.0.0 released

#26
post #4

Lately the decline in popularity of Grunt has been more and more noticeable for me. When adding new packages there are always usage instructions for Gulp, sometimes webpack and alternatives as well but Grunt seems to be notably absent. I'm contemplating switching to one of the more popular task runners, but that would mean having to rebuild a working flow. The question also remains what happens when you have to revis…

until the new shiny thing comes and replaces that. I still don't understand what's wrong with grunt (or whats better with gulp).

(Just a personnal feeling) Gulp commands are more standardized, while in Grunt every plugin seems to develop its own way of doing things. And Gulp tends do do things faster.

But as you said, nothing wrong with Grunt. Indeed feeling the Javascript build tool fatigue , I'm seriously hesitating to do everything in a makefile

Re: Grunt 1.0.0 released

#27
post #9

Obsolete before it hit 1.0. While grunt/gulp was fun for a while... i am not looking back to our 800 line grunt file, complicated async configuration and the tons of dev-dependencies. Webpack blew everything out of the water. 80 lines of config, hot-reloading, code-spliting, hash-filenames... Looking forward to whats coming next.

I went through this in the last couple of weeks. After about a week of infuriating behaviour trying to get gulp/grunt working even remotely how I wanted (eg vendor stuff split so builds don't take 10 seconds) I decided to give webpack a shot.

For anyone else in this position, sorry to the gulp/grunt guys, but skip them - go straight for webpack. It's still taken a lot of work to get a config that works nicely for my usecase, but all in all the experience was really good and I was 80% of the way there in no time at all.

Re: Grunt 1.0.0 released

#28
I have yet to find a use for Grunt that would not be better served with either a more modern replacement or, more commonly/simply/pleasantly, an older replacement like plain old 'make'.

Re: Grunt 1.0.0 released

#30
post #9

Obsolete before it hit 1.0. While grunt/gulp was fun for a while... i am not looking back to our 800 line grunt file, complicated async configuration and the tons of dev-dependencies. Webpack blew everything out of the water. 80 lines of config, hot-reloading, code-spliting, hash-filenames... Looking forward to whats coming next.

Grunt was nasty as hell, and clearly didn't learn any of the lessons from, say, proper Makefiles from the UNIX world over the past 30 years.

Gulp is a looooot better, especially when I have things like Foundation 6's zurb-template, which is basically configured out of the box how I setup my Foundation 5 era projects.

I don't care how big a Gulp file is if I'm not the one having to do major maintenance on it.

Post reply on HN