Creating and Deleting Directories
For our task to copy files from their original location to a destination directory, we need to create that destination directory. And every time we want to re-create the destination folder we’ll need to delete it and its contents. So let’s use Grunt’s built-in tools to create two tasks—one to create the folder and one to delete it.
Specifying Configuration Options
Grunt provides grunt.config.init, which lets us define the configuration for our Grunt tasks by passing in a JavaScript object with the properties and values for our tasks.
| grunt.config.init({ |
| }); |
When you install and configure a Grunt plug-in, you’ll often have to add some properties and values to this configuration ...
Get Automate with Grunt now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.