Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-06-25 07:59:24 +0400
committerisaacs <i@izs.me>2013-06-25 08:03:16 +0400
commit29f5a3321c69103d91726f277515dbb6410f122c (patch)
treed275091096370386165d95e08cc9ecdf4d2d83bb /node_modules/rimraf
parent1aa80c6bdfff8c33f55b05b347898d3fa968df24 (diff)
rimraf@2.2.0
Diffstat (limited to 'node_modules/rimraf')
-rw-r--r--node_modules/rimraf/README.md5
-rwxr-xr-xnode_modules/rimraf/bin.js33
-rw-r--r--node_modules/rimraf/package.json14
3 files changed, 48 insertions, 4 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"
}