grunt-contrib-clean
Advanced tools
Comparing version 0.4.0-a to 0.4.0-rc5
{ | ||
"name": "grunt-contrib-clean", | ||
"description": "Clear files and folders.", | ||
"version": "0.4.0a", | ||
"description": "Clean files and folders.", | ||
"version": "0.4.0rc5", | ||
"homepage": "https://github.com/gruntjs/grunt-contrib-clean", | ||
@@ -23,17 +23,15 @@ "author": { | ||
], | ||
"main": "grunt.js", | ||
"main": "Gruntfile.js", | ||
"engines": { | ||
"node": "*" | ||
"node": ">= 0.8.0" | ||
}, | ||
"scripts": { | ||
"test": "./node_modules/.bin/grunt test" | ||
"test": "grunt test" | ||
}, | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "~0.1.0", | ||
"grunt-contrib-nodeunit": "~0.1.0", | ||
"grunt-contrib-jshint": "~0.1.1rc5", | ||
"grunt-contrib-nodeunit": "~0.1.2rc5", | ||
"grunt-contrib-clean": "~0.4.0rc5", | ||
"grunt-contrib-internal": "*", | ||
"grunt": "~0.4.0a", | ||
"grunt-cli": "~0.1.1" | ||
"grunt": "~0.4.0rc5" | ||
}, | ||
@@ -40,0 +38,0 @@ "keywords": [ |
# grunt-contrib-clean [![Build Status](https://secure.travis-ci.org/gruntjs/grunt-contrib-clean.png?branch=master)](http://travis-ci.org/gruntjs/grunt-contrib-clean) | ||
> Clear files and folders. | ||
> Clean files and folders. | ||
@@ -17,4 +17,48 @@ | ||
## Clean task | ||
_Run this task with the `grunt clean` command._ | ||
*Due to the destructive nature of this task, always be cautious of the paths you clean.* | ||
### Options | ||
#### force | ||
Type: `Boolean` | ||
Default: false | ||
This overrides `grunt.file.delete` from blocking deletion of folders outside current working dir (CWD). Use with caution. | ||
### Usage Examples | ||
There are three formats you can use to run this task. | ||
#### Short | ||
```js | ||
clean: ["path/to/dir/one", "path/to/dir/two"] | ||
``` | ||
#### Medium (specific targets with global options) | ||
```js | ||
clean: { | ||
build: ["path/to/dir/one", "path/to/dir/two"], | ||
release: ["path/to/another/dir/one", "path/to/another/dir/two"] | ||
}, | ||
``` | ||
#### Long (specific targets with per target options) | ||
```js | ||
clean: { | ||
build: { | ||
src: ["path/to/dir/one", "path/to/dir/two"] | ||
} | ||
} | ||
``` | ||
## Release History | ||
* 2013-01-08 v0.4.0rc5 Updating to work with grunt v0.4.0rc5. Switching to this.filesSrc api. | ||
* 2012-12-06 v0.4.0 Conversion to grunt v0.4 conventions. Remove node v0.6 and grunt v0.3 support. Add force option to bypass CWD check. | ||
* 2012-09-22 v0.3.0 Options no longer accepted from global config key. | ||
@@ -27,2 +71,2 @@ * 2012-09-09 v0.2.0 Refactored from grunt-contrib into individual repo. | ||
*This file was generated on Tue Nov 13 2012 15:41:31.* | ||
*This file was generated on Wed Jan 09 2013 14:12:18.* |
@@ -15,3 +15,5 @@ /* | ||
// Merge task-specific and/or target-specific options with these defaults. | ||
var options = this.options(); | ||
var options = this.options({ | ||
force: false | ||
}); | ||
@@ -21,6 +23,7 @@ grunt.verbose.writeflags(options, 'Options'); | ||
// Clean specified files / dirs. | ||
this.file.src.forEach(function(filepath) { | ||
this.filesSrc.forEach(function(filepath) { | ||
grunt.log.write('Cleaning "' + filepath + '"...'); | ||
try { | ||
grunt.file.delete(filepath); | ||
grunt.file.delete(filepath, options); | ||
grunt.log.ok(); | ||
@@ -27,0 +30,0 @@ } catch (e) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
8806
95
71
2