source: Dev/trunk/node_modules/grunt-contrib-clean/README.md @ 529

Last change on this file since 529 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 3.2 KB
Line 
1# grunt-contrib-clean [![Build Status](https://travis-ci.org/gruntjs/grunt-contrib-clean.png?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-clean)
2
3> Clean files and folders.
4
5
6
7## Getting Started
8This plugin requires Grunt `~0.4.0`
9
10If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
11
12```shell
13npm install grunt-contrib-clean --save-dev
14```
15
16Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
17
18```js
19grunt.loadNpmTasks('grunt-contrib-clean');
20```
21
22*This plugin was designed to work with Grunt 0.4.x. If you're still using grunt v0.3.x it's strongly recommended that [you upgrade](http://gruntjs.com/upgrading-from-0.3-to-0.4), but in case you can't please use [v0.3.2](https://github.com/gruntjs/grunt-contrib-clean/tree/grunt-0.3-stable).*
23
24
25
26## Clean task
27_Run this task with the `grunt clean` command._
28
29Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.
30
31*Due to the destructive nature of this task, always be cautious of the paths you clean.*
32### Options
33
34#### force
35Type: `Boolean` 
36Default: false
37
38This overrides this task from blocking deletion of folders outside current working dir (CWD). Use with caution.
39
40#### no-write
41Type: `Boolean` 
42Default: false
43
44Will log messages of what would happen if the task was ran but doesn't actually delete the files.
45
46### Usage Examples
47
48There are three formats you can use to run this task.
49
50#### Short
51
52```js
53clean: ["path/to/dir/one", "path/to/dir/two"]
54```
55
56#### Medium (specific targets with global options)
57
58```js
59clean: {
60  build: ["path/to/dir/one", "path/to/dir/two"],
61  release: ["path/to/another/dir/one", "path/to/another/dir/two"]
62},
63```
64
65#### Long (specific targets with per target options)
66
67```js
68clean: {
69  build: {
70    src: ["path/to/dir/one", "path/to/dir/two"]
71  }
72}
73```
74
75## Release History
76
77 * 2013-07-15   v0.5.0   Use rimraf directly, version 2.2.1 to fix issue on Windows. Add no-write option to mimic grunt.file.delete behavior.
78 * 2013-04-16   v0.4.1   Check if file exists to avoid trying to delete a non-existent file.
79 * 2013-02-15   v0.4.0   First official release for Grunt 0.4.0.
80 * 2013-01-18   v0.4.0rc6   Updating grunt/gruntplugin dependencies to rc6. Changing in-development grunt/gruntplugin dependency versions from tilde version ranges to specific versions.
81 * 2013-01-09   v0.4.0rc5   Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api.
82 * 2012-12-07   v0.4.0a   Conversion to grunt v0.4 conventions. Remove node v0.6 and grunt v0.3 support. Add force option to bypass CWD check.
83 * 2012-09-23   v0.3.0   Options no longer accepted from global config key.
84 * 2012-09-10   v0.2.0   Refactored from grunt-contrib into individual repo.
85
86---
87
88Task submitted by [Tim Branyen](http://tbranyen.com/)
89
90*This file was generated on Mon Jul 15 2013 20:45:46.*
Note: See TracBrowser for help on using the repository browser.