Live data from Hacker News

Why we should stop using Grunt and Gulp

blog.keithcirkel.co.uk

101–108 of 108 posts

Re: Why we should stop using Grunt and Gulp

#101
post #30

I simply use Make for all my web projects, whether it's a Ruby JSON API, or a React front-end. It's reliable, pre-installed everywhere, and can wrap anything in one consistent CLI. Why have to remember whether to type lein repl , pry , or rails console , when make repl will do everytime? Ditto, bundle install , npm install , lein deps => make deps . make server can easily wrap whatever command launches the server, ma…

keep in mind that make isn't going to work on Windows. For a lot of people, that's okay (including myself). Still, a ton of developers still work on Windows.

Make works great in cygwin.

Re: Why we should stop using Grunt and Gulp

#102
post #19

I found all build systems for all platforms to be a total PITA and eventually i just resort to using a shell or python script to invoke the commands i want. With this method you can very easily add user promting (do you want to build debug or release?), database reporting of build and test results, source control integration etc. Whatever i learn here can be applied and reused for new things in the future instead of…

> Gradle requires you to read the first 12 chapters of the manual before you can even begin doing something more advanced than running compile

The purpose of Gradle, like other products in the Groovy echosystem, is to sell consulting fees and conference seats for their backers, in this case Gradleware. Hence providing easy-to-use doco would defeat the point of the product.

Re: Why we should stop using Grunt and Gulp

#103
post #26

Earlier quoted context omitted.

The "horrific syntax and semantics" claim seems pretty drive-by, the variables and some function names might be arcane, but newer releases have nicer aliases for those who care for them. I don't know what is so horrific about the semantics though, they are pretty straightforward. A Makefile is a set of rules, each rule being a target file, its dependencies, and the recipe to turn the dependencies into the target. Mak…

> unsubstantiated FUD isn't necessary Sure. ...but to be fair, regardless of the make syntax, you've also got to look at the history of make, and what it's designed to achieve. Make is for executing shell commands on file patterns with dependency rules. It's not designed to use an ecosystem of plugins or have long running processes (eg. to run a local server or watch for file changes). It's not designed to be a scrip…

> Make is for executing shell commands on file patterns with dependency rules.

Yep absolutely. Make is a system for generating files from other files, it is that simple. Compiling templates and code, generating source maps, concatenating, minifying -- many of these tasks all fall under that umbrella.

> It's not designed to use an ecosystem of plugins or have long running processes (eg. to run a local server or watch for file changes).

You're right, I wouldn't advocate that either. Procfiles and tools like foreman (and it's various reimplementations, like honcho) are for managing those processes: development servers, file watchers, etc. That's actually my own personal approach, I go for the Makefile/Procfile combo and run `foreman start` to boot up the a server and any other processes that project might need. Works pretty well for me.

> Make isn't a bad tool; for very doing some specific things. Specifically building c code on unix-ish systems.

That's a pretty narrow view, like I said earlier, it's good for any application where you're generating files from other files. Building an ebook, managing unwieldy SSH configurations (smdh at lack of include directive in SSH config), etc.

So yeah I agree make is no good at being an all-in-one everything-and-the-kitchen-sink suite. And that's great. It has one job and does it well enough, and is even better complemented by other tools. Some people like the suite approach better, but I wouldn't disparage make for something it wasn't intended to do to begin with.

Re: Why we should stop using Grunt and Gulp

#104
post #70
post #10

Why don't people just use make?

Is there a way to do a filewatch -> sass -> livereload with make? That was the primary reason for me using grunt.

I wouldn't use make for file watching and live reloading. I would express the Sass and CSS dependencies in a Makefile, and then describe the dev server, file watching[1], and live reloading[2] processes in a Procfile, using something like foreman[0].

[0]: http://ddollar.github.io/foreman/ [1]: http://entrproject.org/ [2]: https://www.npmjs.org/package/livereload

Re: Why we should stop using Grunt and Gulp

#105
post #88
post #84

Earlier quoted context omitted.

I know people who develop (and use make) on BSD and OS X (I do), but, seriously, is any OS on our lists (OS X, (Open)Solaris-derivations and *BSD excepted) likely to be the target for the kind of software Grunt is used to develop?

Most likely not, my point was just to pass the information specially to those stuck in GNU/Linux, that it isn't as portable as many think it is.

GNU Make is probably available on all those platforms.

Re: Why we should stop using Grunt and Gulp

#106

Earlier quoted context omitted.

You can't use make to install grunt on Windows?

You have to install make some how. That's the problem. You're tying all these cross platform tools together with something that isn't cross platform. Grats.

You can make your life difficult if you so desire, but you can also simply install Cygwin and be happy.

Re: Why we should stop using Grunt and Gulp

#107
post #88

Earlier quoted context omitted.

Most likely not, my point was just to pass the information specially to those stuck in GNU/Linux, that it isn't as portable as many think it is.

GNU Make is probably available on all those platforms.

If it does, doesn't mean it is possible to use it.

Re: Why we should stop using Grunt and Gulp

#108
post #76
post #10

Why don't people just use make?

Because it isn't portable, not even across UNIX/POSIX systems. Each make has it own set of extensions outside of what POSIX requires. Additionally, for almost every task you need to call out to external tools that also have their own set of compatibility issues across UNIX/POSIX systems. Ideally everyone writing a Make script would need to read the POSIX standard and only use common features, but since that isn't the…

But autotools/autoconf solve a whole set of different cross-platform problems to "make runs and does things". The make syntax doesn't change across platforms; nor does the sh syntax. What you execute might change, but I'm not sure that's too much of a problem for the usual web pipeline use case.
Post reply on HN