Live data from Hacker News

Maybe stop using Grunt?

medium.com

31–40 of 51 posts

Re: Maybe stop using Grunt?

#31

How are all of you using any npm-based system combined with a continuous integration or clean build environment? It seems that a simple yeoman/grunt setup that just preprocesses some HTML and JS takes... a very long time. A minute or two just for the actual work. Plus 5-15 minutes for npm to make a thousand requests and write 10K+ files to the filesystem. I hack around it by keeping node_modules around as a special r…

> It seems that a simple yeoman/grunt setup that just preprocesses some HTML and JS takes... a very long time.

I have not experienced this. I built a 15k+ line CoffeeScript app. Every time a file changed it would compile it to JS and run thousands of unit tests in ~1 second.

As for the clean NPM... I never deleted that directory. I believe I read an article somewhere that you should actually commit your module dir. Maybe that's no longer in vogue though?

Re: Maybe stop using Grunt?

#34
post #30

I keep seeing people mention "a mess of shell scripts", and then use replacements which are dozens if not hundreds of lines of custom-configuration files. Shell scripts, when you're not dealing with autotools generated script, aren't really that big, or even that complicated. Not to mention that the ability to chain disparate tools and subshells can be incredibly elegant and powerful.

> Shell scripts, when you're not dealing with autotools generated script, aren't really that big, or even that complicated. They're not always portable. Some people develop on windows.

Windows offers shell scripts as well. Powershell, instead of Bash/Zsh/..., but they still offer many of the same opportunities.

Considering that teams frequently homogenize on one type of machine - bet it windows or Mac or Linux, shell scripts are typically portable enough for these use cases.

Re: Maybe stop using Grunt?

#35

Maybe I am missing something, but it seems like most of theses tools are working around the fact the windows doesn't come with make by default. They are essentially reinventing the wheel for web developers who have never worked from the command line before.

There's a lot of distaste for make as well, typically centered on the limitations of the dependency and .PHONY targets.

I rarely find them to be limitations for my projects, but there's certainly a reason so many different build systems have been built, even for Linux.

Re: Maybe stop using Grunt?

#38

Maybe I am missing something, but it seems like most of theses tools are working around the fact the windows doesn't come with make by default. They are essentially reinventing the wheel for web developers who have never worked from the command line before.

I've written both makefiles and gulpfiles.

Yeah, I guess you can get make to do the exact same things as gulp, but gulp already does what a web developer needs, in a language they already know, with a massive plugin ecosystem you don't have to re-implement in shell.

Re: Maybe stop using Grunt?

#39
post #21

Earlier quoted context omitted.

Grunt doesn't do dirty-file dependency checking. Gulp does, sort of, but it's awkward. There are many, many build tools in JS-land. Grunt and Gulp happen to be the most popular. (This isn't really due to technical merit. They're popular mostly because they're popular.) My personal favorite is Jake, which is a classic Rake-like (or Make-like) tool.

Or instead of a Make-like tool you could just use Make itself :) Works really well.

You could, but I much prefer more expressive tools. Make's DSL is spectacularly crappy.

Re: Maybe stop using Grunt?

#40

How are all of you using any npm-based system combined with a continuous integration or clean build environment? It seems that a simple yeoman/grunt setup that just preprocesses some HTML and JS takes... a very long time. A minute or two just for the actual work. Plus 5-15 minutes for npm to make a thousand requests and write 10K+ files to the filesystem. I hack around it by keeping node_modules around as a special r…

Both Travis CI and Circle CI cache your node_modules directory between builds. If you don't change your package.json, it just uses that cache instead.
Post reply on HN