Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You are right, all of this can be done via makefile ... assuming you know how to set up a makefile and take the time to do so. Part of the goal of grunt, as I understand it, is to make it so developers have fewer excuses for not doing this -- setting up a project of a certain type becomes a one-liner. To me, that feels a whole lot simpler than suggesting that developers create the makefile you propose. More often than not, such suggestions result in projects that have no makefile at all -- and thus no tests, no minification, no linting, etc. If grunt helps developers integrate those best practices more easily, that feels like a good thing to me.


I'm not sure why people are afraid of Makefiles. I know an incredible number of developers who view them as this scary black box. They are not a heavy weight thing which justify making excuses about not producing.

Here's what it takes to make a new Javascript project:

    mkdir project
    cd project
    touch foo.js bar.js
    echo -e 'project.js: foo.js bar.js\n\tcat $^ > $@' > Makefile
Unless you're jQuery, you don't need minification or GZipping because clients of your library already have their own. You don't need your own linting because you can trivially run `jshint project.js`.

If you find yourself running the same command in your shell a bunch of times, add it to your Makefile. It's that simple.


As someone who is not afraid of Makefiles (and has used them by default in past JavaScript-based projects), I welcome tools like Grunt to my projects. It fits in well with the types of "build" tasks I'm typically invoking in my JavaScript projects — and done so in a much simpler and abstracted syntax I prefer to work with.

Also, based on your comments, I think you and I have different definitions of "simple". :)


I'm using Rich Hickey's definition: http://www.infoq.com/presentations/Simple-Made-Easy

You might be using it to mean what he's defined as "easy".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: