Jump to ratings and reviews
Rate this book

Getting Started with Grunt: The JavaScript Task Runner

Rate this book
A handson approach to mastering the fundamentals of Grunt This book is for JavaScript developers who want to get to grips with GruntJS and use it to build and test their JavaScript applications. The only requirement for this book is a basic understanding of objects and functions in JavaScript. In recent times, modern web browsers have become the application platform of choice. Grunt, along with its wide range of plugins, provides a simple way of managing the large number of build tasks required to maintain a sophisticated web application. Getting Started with The JavaScript Task Runner provides you with all the information you need to become an effective Grunt power-user. You will quickly learn how to install, configure, and run Grunt. You will go on to understand how to use third-party Grunt and then create your own Grunt tasks that cater to your particular needs. This book first demonstrates various Grunt use cases before running through the steps of installing, configuring, running, and customizing Grunt. You will learn how to install Node.js, the Node.js package manager (npm), and Grunt. Then, you will understand how to set up and configure a personalized Grunt environment. Next, you will look at the various methods of running and customizing Grunt to utilize its flexibility. Finally, to emphasise what has been learnt, you will see a complete example build of a web application. Getting Started with The JavaScript Task Runner will enable you to create your very own Grunt environments from scratch and fully utilize Grunt's large feature set to effectively solve your custom requirements.

132 pages, Paperback

First published December 28, 2013

7 people are currently reading
19 people want to read

About the author

Jaime Pillora

1 book1 follower

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
18 (38%)
4 stars
20 (42%)
3 stars
6 (12%)
2 stars
3 (6%)
1 star
0 (0%)
Displaying 1 - 9 of 9 reviews
Profile Image for Chris Sanders.
1 review1 follower
July 30, 2014
This book is among the best introductions to Grunt: The Javascript Task Runner and Nodejs platform I have seen to date. I was so pleased with this book that I recommended it to the other developers on my team immediately upon finishing this book.
The author immediately starts us out with creating a simple Grunt task. He explains the benefits of using a task runner at all in the development process. We learn why Grunt is an excellent choice for task runner in real world use cases such as code minification, code linting and code deployments.
Next we are guided through a more thorough set up of Grunt and the NodeJS platform. We learn about basic configuration and directory structure. The author does not stop there though. He walks us through installing grunt packages and plug-ins as well as building our own custom Grunt tastsk.
By the end of this book the author had me convinced that Grunt is the tool my team can leaverage at work to get control of our unweildy code base and get some structure and consistency around our deployment process.
Often times I find that beginner books are almost too beginner for the audience they are trying to target. This book really hits the sweetspot in terms of getting beginners set up quickly and easily without alienating more senior developers or going into the gory details of Grunt before developers have any real context or understanding around the problem Grunt attempts to solve.
One way I would improve this book is move the last 15-20 pages on development tools to an appendix of some sort. However, I would not include it as a part of a chapter titled Advanced Grunt.
Full disclosure: I was asked to do this review literally the day after I finished reading it. However, I’ve read this book and thoroughly enjoyed every minute of it.
I’m stunned that such a potentially boring topic could make for an amazing book.
Get the book here: http://bit.ly/1pvgcnH
21 reviews1 follower
March 19, 2014
Review - "Getting started with Grunt - The Javascript Task Runner" by Jaime Pillora

Finished reading the book

It is an introduction to the popular JavaScript build tool, Grunt. This book aims to provide the reader with a practical skillset, which can be used to solve real-world problems. This book is example driven, so each feature covered in this book is explained and also reinforced through the use of runnable examples, this dual method of learning will provide the reader with the means to verify that the theory aligns with its practical use.

The book covers installation and project setup well. We understand the purpose of the package.json file and the Gruntfile.js file. It covers many common build problems by combining different examples, and we see how we can quite easily make use of various premade Grunt plugins to vastly simplify previously complex build processes. We learn to create our own tasks and multitasks using the full extent of features available to us. We also learn to execute tasks in a wide variety of ways, and understand the situations in which to use runtime options, arguments, and when to simply use configuration. We take a brief look at JavaScript testing and a Grunt plugin, which we could use to integrate Mocha into our Grunt build. We also see a short introduction into Grunt plugins and how they work, as well as other useful plugins. Finally, we go through JavaScript Resources and Development Tools not specifically related to Grunt, however, when combined with Grunt, each tool may help to bring our development cycle to the next level.

Overall this book is good enough to get you interested and make you undertand how grunt brings value to your projects, and why it is a good idea to devote time learning it and integrate it into your development workflow. Grunt is a task runner and it does exactly what it claims to do and this book mght be a good stepping stone for you to turn yourself most productive with grunt. While you are at it also check out some other tools like Gulp and Broccoli.

Get the book here: http://www.packtpub.com/getting-start...
1 review
March 5, 2014

I am a back-end developer that moved into front-end last year. Currently I am running full speed on angularjs and therefore learning grunt was a MUST. The book starts with examples from the first page, I found interesting that most of the concepts are explained deeply and in a concise manner and on top of that it seemed nice that the author decided to add links inside the text, whether he considered necessary that the reader should receive further explanation.

Going further, on the second chapter there is a lean start where basic examples are analyzed and down the road they get more complicated and new tasks are added to the gruntfile.

On the third and fourth chapters the author digs into more advanced concepts, encouraging the user to take full control of the task runner and customize it making use of the fully blown examples provided, third party modules and so on. He also points out the different types of tasks (multi tasks , async ecc.)

One think that I found disappointing was that there are no examples on how to integrate grunt with maven, since I come from a java background and most of the deployment systems still rely on maven, I would have loved to have that part covered. For those that are interested in the topic, like me, there are a lot of blog posts that cover this but having everything bundled in one book would have been more comfortable.

I recommend the book to either beginners and people new to the async programming but also to advanced programmers because in 100 pages it managed to cover what a web developer should know about gruntjs.
Profile Image for Ivan Fraixedes.
22 reviews
March 16, 2014
This book provides a deep introduction to Grunt, a famous and well adopted Javascript Task Runner.

It walks through from the beginning until the last task that any developer may need during his developments. You will learn the Grunt fundamentals and how to setup it to help you to transcompile sources with those languages that you probably prefer than javascript but you love because they produce javascript, the language the web understands alike with the related ones with CSS, without forgetting the template engines which make your life easier for the bunch of html files that you must code and you miss of the current HTML approved specification, although it’s getting better quite fast.

When you have your Grunt with all this tasks, your start to save time in your daily task, avoiding to type so many times a bunch of commands that you needed before, but it also teach you how to help you more allowing you to make changes in your sources and get the compiled code without typing any thing with the watcher Grunt plugin.

However, it doesn’t stop there, and it goes further, teaching you how to use Grunt for your deployments, just transform your code for production, testing it and after deploy it in the famous Amazon cloud services.

If after read it, you feel that Grunt is the tool that you always wanted, don’t wait more, get it on PacktPub and in some hours you’ll be ready to use it.
9 reviews
July 26, 2016
I did use Grunt for many projects before, but while reading this book it finally clicked in my brain. This is definitely a good buy for anything who just started with Grunt, but also for people who want to know what else they could do with that amazing "JavaScript Task Runner". The part about installing Node and Grunt should be moved to the very beginning imho, but that´s alright. The book may look small with only 132 pages, but i don´t miss any feature i may ever need. From installing Grunt, choosing/using the right plugins (htmlmin, cssmin, uglifyjs - to name the most important ones), creating advanced custom tasks to testing and continuous integration, you will not regret buying this book. It also makes sense to read it very carefully and not skip any part of it, there are many Links to useful resources spread all over the book. References to Douglas Crockford are a clear sign that the author knows what he is talking about :)
Btw, I recommend taking a closer look at "Gulp" too. In case you don´t know it, that´s another JS Task Runner with almost the same power as Grunt. There are way more plugins available for Grunt right now, but some people just prefer Gulp because it´s easier to learn.
1 review1 follower
March 9, 2014
I learnt about Grunt a while back and wanted to use it for my projects. I used a couple of tutorials online but had a hard time configuring the Gruntfile. If you are a beginner with no experience in Grunt and Nodejs, this book guides you through the various modules and dependencies using use cases.

The first chapter talks about the usual intros that you would read in any other book but the author has tried to make it as informative as possible. I for one didn't know about the ability to use Grunt for FTP and Amazon AWS.

The Second chapter talks about the various node modules that you need to setup to get started with Grunt.

The next two chapters guide you through using Grunt on a normal web application project.

Grunt is already a great tool and this is a great book provides a lot of details on how you can use the popular modules for your projects. The third and fourth chapters are what i am following for my new project now.

Grunt is known for being extremely hard to configure but this book made it quite simple for a beginner like me. I would have given it 5/5 if it had covered a little bit of Yeoman but this is the best resource I have for working with Grunt.
Profile Image for Arne.
1 review
March 16, 2014
I found this book very useful. I'd been using Grunt for a while, but I didn't understand how it worked under the hood, so I wasn't able to do andy big changes to my Gruntfile.

This book gave a nice overview of the posibilities of Grunt. Then it explained about node.js and npm so that I could understand how grunt works. Jaime Pillora explained about using grunt step by step and there was a chapter devoted to a complete setup of task automation with coffeescript, jade and stylus, minification and watching.

I missed more details in chapter 5 'Testing with Grunt'

I strongly recommend this book if you are doing javascript development.
1 review
July 25, 2014
Excellent piece. It really helped to set up Grunt on my AngularJS project. Since I was completely new to node.js I absolutely can recommend this book to anyone who wants to start task automation on a Javascript project (e.g. AngularJS).

http://bit.ly/1pvgcnH
Displaying 1 - 9 of 9 reviews

Can't find what you're looking for?

Get help and learn more about the design.