
Grunt.js - cleverjake
http://gruntjs.com/
======
arturadib
At Mozilla's PDF.js, we looked at several build alternatives in 2011. The main
problem was that they all required a learning curve (they all looked like a
domain-specific language), and sometimes they were too limited for our needs.

Since we already did everything through Makefiles, what we wanted was a shell
script/Make that worked out of the box in all platforms (Windows included). So
we wrote ShellJS for Node.js:

<https://github.com/arturadib/shelljs>

It is now battle-tested in several Mozilla projects (PDF.js, Firefox OS,
Butter.js, etc). Check it out, happy to answer questions/comments at
@arturadib.

~~~
ben_alman
ShellJS is awesome. It's basically Unix shell commands for Node.js, which is
excellent if you want to write a makefile equivalent in JavaScript.

If, on the other hand, you want to execute web developer-centric tasks like
concatenation and minification, linting, running of unit tests in pure
JavaScript or a headless WebKit instance, or any of the functionality the 90+
plugins I'm aware of provide, check grunt out.

Grunt also works on all platforms, and supports completely arbitrary
JavaScript tasks. If you can write it, grunt will execute it.

And because grunt supports arbitrary JavaScript tasks, you can use ShellJS (or
any other JavaScript) from within grunt.

------
jayferd
With this sort of tool, I always have to ask myself: is it better than a
Makefile?

<https://github.com/mathquill/mathquill/blob/dev/Makefile>

Yes, Makefiles don't have magic syntax for qunit, but they're _incredibly_
flexible.

~~~
arturadib
Agreed. And if you need cross-platform support (and the bonus of being
JavaScript), try <https://github.com/arturadib/shelljs>

~~~
pooriaazimi
ShellJS looks great! Thank you.

------
rektide
Supposedly Yeomen is supposed to drop soon, which- I'm just guessing- is a
bunch of inits and tasks built on Grunt to accomplish more. Yeomen is out of
Google.

~~~
patrickaljord
Yeoman*. <http://yeoman.io/>

------
bryanwb
i can see the value of a build/automation tool written in js but man the
resulting code is pretty ugly compared to a typical Rakefile

------
lvh
I am currently using Brunch[1] as a build system.

How does grunt compare, and why should I switch?

[1]: <http://brunch.io/>

------
richo
I don't get it.. are you posting this as news?

I'm pretty sure it's common knowledge, I'm one of those annoying node haters
and I've known about it for months now.

~~~
sp4rki
Not useful or common knowledge to you doesn't mean it's not useful or new for
others. If you knew about it, and dislike it, what are you doing commenting
here? If I had the same opinion I would have shrugged and told myself "Oh...
grunt... again... Move along", not come in here to make a completely useless
remark, which by the way obviously does not align with what the majority here
thinks.

~~~
richo
It was intended as a legit question. With such a descriptive title as
"Grunt.js" on the submission.. it was kinda hard to tell.

Had it been "Grunt.js has a new website" I would have kept my fat mouth shut.

------
MatthewPhillips
Hows it work on Windows? I use Windows, Mac, and Linux in pretty equal amounts
so I need a build system that works on all 3.

~~~
arturadib
Try ShellJS. It works on all three platforms, and has been battle-tested in
the build systems of several Mozilla projects (PDF.js, Firefox OS, Popcorn.js,
etc).

<https://github.com/arturadib/shelljs>

~~~
MatthewPhillips
Sweet! I was just looking for a cross platform build tool but this seems like
it can be useful in many other ways.

