Sha256: a950a4f39d00ac97e9f33c3b9dd7345293ef67b4529ef2b4748edd1a49d844c1
Contents?: true
Size: 744 Bytes
Versions: 84
Compression:
Stored size: 744 Bytes
Contents
#!/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) }) }
Version data entries
84 entries across 31 versions & 9 rubygems