diff --git a/README.md b/README.md index 8b1584d..a62afb1 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,31 @@ clean: { } ``` +"Compact" and "Files Array" formats support a few [additional properties](http://gruntjs.com/configuring-tasks#files) +which help you deal with hidden files, process dynamic mappings and so on. + +#### Globbing Patterns + +Although documented [in the Grunt Docs](http://gruntjs.com/configuring-tasks#globbing-patterns), here are some globbing pattern examples to acheive some common tasks: + +```js +clean: { + folder: ['path/to/dir/'], + folder_v2: ['path/to/dir/**'], + contents: ['path/to/dir/*'], + subfolders: ['path/to/dir/*/'], + css: ['path/to/dir/*.css'], + all_css: ['path/to/dir/**/*.css'] +} +``` + +* __`folder`:__ Deletes the `dir/` folder +* __`folder_v2`:__ Deletes the `dir/` folder +* __`contents`:__ Keeps the `dir/` folder, but deletes the contents +* __`subfolders`:__ Keeps the files inside the `dir/` folder, but deletes all subfolders +* __`css`:__ Deletes all `*.css` files inside the `dir/` folder, excluding subfolders +* __`all_css`:__ Deletes all `*.css` files inside the `dir/` folder and its subfolders + ##### Skipping Files ```js @@ -84,9 +109,6 @@ clean: { } ``` -"Compact" and "Files Array" formats support a few [additional properties](http://gruntjs.com/configuring-tasks#files) -which help you deal with hidden files, process dynamic mappings and so on. - ###### Options Options can be specified for all `clean` tasks and for each `clean:target`. @@ -138,4 +160,4 @@ clean: { Task submitted by [Tim Branyen](http://tbranyen.com/) -*This file was generated on Fri Jan 22 2016 11:11:40.* +*This file was generated on Fri Jan 22 2016 12:07:21.* diff --git a/docs/clean-examples.md b/docs/clean-examples.md index 084edfe..db5ad6c 100644 --- a/docs/clean-examples.md +++ b/docs/clean-examples.md @@ -27,6 +27,31 @@ clean: { } ``` +"Compact" and "Files Array" formats support a few [additional properties](http://gruntjs.com/configuring-tasks#files) +which help you deal with hidden files, process dynamic mappings and so on. + +## Globbing Patterns + +Although documented [in the Grunt Docs](http://gruntjs.com/configuring-tasks#globbing-patterns), here are some globbing pattern examples to acheive some common tasks: + +```js +clean: { + folder: ['path/to/dir/'], + folder_v2: ['path/to/dir/**'], + contents: ['path/to/dir/*'], + subfolders: ['path/to/dir/*/'], + css: ['path/to/dir/*.css'], + all_css: ['path/to/dir/**/*.css'] +} +``` + +* __`folder`:__ Deletes the `dir/` folder +* __`folder_v2`:__ Deletes the `dir/` folder +* __`contents`:__ Keeps the `dir/` folder, but deletes the contents +* __`subfolders`:__ Keeps the files inside the `dir/` folder, but deletes all subfolders +* __`css`:__ Deletes all `*.css` files inside the `dir/` folder, excluding subfolders +* __`all_css`:__ Deletes all `*.css` files inside the `dir/` folder and its subfolders + ### Skipping Files ```js @@ -36,9 +61,6 @@ clean: { } ``` -"Compact" and "Files Array" formats support a few [additional properties](http://gruntjs.com/configuring-tasks#files) -which help you deal with hidden files, process dynamic mappings and so on. - #### Options Options can be specified for all `clean` tasks and for each `clean:target`.