diff options
-rw-r--r-- | node_modules/rimraf/README.md | 5 | ||||
-rwxr-xr-x | node_modules/rimraf/bin.js | 33 | ||||
-rw-r--r-- | node_modules/rimraf/package.json | 14 | ||||
-rw-r--r-- | package.json | 2 |
4 files changed, 49 insertions, 5 deletions
diff --git a/node_modules/rimraf/README.md b/node_modules/rimraf/README.md index 96ce9b2a0..8fc677956 100644 --- a/node_modules/rimraf/README.md +++ b/node_modules/rimraf/README.md @@ -19,3 +19,8 @@ errors are handled for you: It can remove stuff synchronously, too. But that's not so good. Use the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf <path>` which is useful for cross platform support. diff --git a/node_modules/rimraf/bin.js b/node_modules/rimraf/bin.js new file mode 100755 index 000000000..29bfa8a63 --- /dev/null +++ b/node_modules/rimraf/bin.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf <path>') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else { + args.forEach(function(arg) { + rimraf.sync(arg) + }) +} diff --git a/node_modules/rimraf/package.json b/node_modules/rimraf/package.json index 679ee6b03..e65f9a263 100644 --- a/node_modules/rimraf/package.json +++ b/node_modules/rimraf/package.json @@ -1,6 +1,6 @@ { "name": "rimraf", - "version": "2.1.4", + "version": "2.2.0", "main": "rimraf.js", "description": "A deep deletion module for node (like `rm -rf`)", "author": { @@ -22,6 +22,9 @@ "scripts": { "test": "cd test && bash run.sh" }, + "bin": { + "rimraf": "./bin.js" + }, "contributors": [ { "name": "Isaac Z. Schlueter", @@ -45,11 +48,14 @@ "email": "yosefd@microsoft.com" } ], - "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n", + "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path>` which is useful for cross platform support.\n", "readmeFilename": "README.md", - "_id": "rimraf@2.1.4", + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, "dependencies": { "graceful-fs": "~1" }, - "_from": "rimraf@2" + "_id": "rimraf@2.2.0", + "_from": "rimraf@2.2" } diff --git a/package.json b/package.json index 8fc821a12..c20825c6d 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "graceful-fs": "~1.2.2", "minimatch": "~0.2.12", "nopt": "~2.1.1", - "rimraf": "2", + "rimraf": "~2.2.0", "request": "~2.21.0", "which": "1", "tar": "~0.1.17", |