A Beginner's Guide To Grunt: Redux

added by JavaScript Kicks
11/24/2014 8:49:30 AM

324 Views

Back in March 2013 I wrote A Beginner’s Guide To Grunt, and it’s become the most visited article on my site. I wrote it at a time when I was just starting out with Grunt, and it was as much a guide for myself as anyone else. Now, 18 months later, I felt it was time to revisit how I use Grunt because I’ve learned a lot more in that time.


3 comments

Drew Peterson
11/24/2014 7:28:03 PM
I'm glad to see that you chose to use Grunt without using a generator like Yeoman et al in your guide. Often I find that many of the generators out there (for Yeoman or otherwise) are broken in some way out of the box, or leave some required configuration up to the user without explaining that anywhere. Is it possible with something like the uglify plugin to give it a directory to minify, rather than individual source files? One thing that sometimes bothers me about javascript build tools is the tediousness in configuring and keeping them up to date.

Robert Greyling
11/24/2014 10:39:01 PM
Hey @drewpcodes - when talking about handling multiple files, are you referring to Globbing Patterns maybe? Or is it something else?

Matt Bailey
11/25/2014 9:16:29 AM
Hi @drewpcodes. Absolutely, you can target individual files, or a whole directory, you can say "all these files, but not that one" and so on... Most Grunt tasks follow standard globbing patterns outlined here: http://gruntjs.com/configuring-tasks#globbing-patterns