From 29f5a3321c69103d91726f277515dbb6410f122c Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 24 Jun 2013 20:59:24 -0700 Subject: rimraf@2.2.0 --- node_modules/rimraf/README.md | 5 +++++ node_modules/rimraf/bin.js | 33 +++++++++++++++++++++++++++++++++ node_modules/rimraf/package.json | 14 ++++++++++---- 3 files changed, 48 insertions(+), 4 deletions(-) create mode 100755 node_modules/rimraf/bin.js (limited to 'node_modules/rimraf') 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 ` 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 ') + 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 ` 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" } -- cgit v1.2.3