Automate with Grunt

Automate with GruntWriting books is a hard task. Writing good book is even harder. Writing a good book about JavaScript in my opinion is almost impossible. There are many books about JavaScript but only few of them are worth mentioning. One of the best in the subject is of course JavaScript: The Good Parts by Douglas Crockford. Is Automate with Grunt: The Build Tool for JavaScript by Brian P. Hogan as good?

In my opinion – it’s not. But that doesn’t mean this is a bad book. It’s good but it isn’t great. It’s main subject, Grunt, and the whole topic of automation of day-to-day tasks regarding JavaScript is relatively new in the community and unfortunatelly often neglected by developers. This books gives raw overview of one of the possibilities there are for it. And that’s one of the biggest benefits you will get after reading it – knowledge that this is possible and it’s something you should consider looking at.

“Automate with Grunt” is not a long book, it has only 66 pages. And that’s good! This book was designed with idea of just giving teasers of some of the most powerful features of Grunt without deeper analysis of them – that was left for the reader. The content is divided in 6 chapters and unfortunately I had an impression that there is a chaos in there. Some of the commonly used tools (accessible via Grunt) like JSHint or Uglify are mentioned by the way of different topics and from my point of view – that was a mistake. Another mistake was only mentioning that automating unit tests execution is an option in Grunt when for me it’s the most important aspect why I would consider looking deeper into this tool.

I said earlier that “Automate with Grunt” is a good book and I believe it’s true. Despite many flaws and inconsistencies it has, it gives great overview what you could accomplish with Grunt, how it could ease you day job and how you can extend it with small effort with plugins (external or our own) and project templates. Last two chapters (“Create a Plug-in” and “Create Project Scaffolds”) are most valuable part of the book. If we’re working with a team or we do a lot of same task over and over – Grunt can be a great help and those chapters shows why so that the whole team could benefit from them.

One last thing I think could be done better are references and guidance where to go next after reading about some feature. For example there is a whole chapter about creating a plugin but there are no references on how to build them and share with the team. Grunt is builded on top of NodeJS modules and that explained well enough. But it could be a lot more helpful if there is a guidance what to do next with our plugin or project scaffold next.

To summarise – “Automate with Grunt” is book worth spending one evening over even just to know the fact that automation in JavaScript is possible and it’s as easy as it should be. I would recommend it for every developer that likes to manage everything from one place and doesn’t enjoy doing same things over and over again. If you just starting your adventure with JavaScript – don’t bother reading it. It will only complicate things that should be simple from the beginning.

Mark: 4 / 5

Review author: Łukasz Rybka