Comparing version 3.0.1 to 3.0.2
@@ -59,3 +59,3 @@ // Generated by CoffeeScript 1.7.1 | ||
} | ||
this.patterns = patterns; | ||
this.patterns = patterns.slice(); | ||
if (typeof opts === 'function') { | ||
@@ -101,2 +101,12 @@ callback = opts; | ||
var existing, f, fileId, path, pattern, patternId, _i, _len; | ||
if (err) { | ||
if (!this.callback) { | ||
this.emit('error', err); | ||
} | ||
this.removeAllListeners(); | ||
if (this.callback) { | ||
this.callback(err); | ||
} | ||
return; | ||
} | ||
patternId = this.patterns.length; | ||
@@ -121,11 +131,3 @@ pattern = this.patterns.shift(); | ||
} | ||
if (err) { | ||
this.emit('error', err); | ||
this.removeAllListeners(); | ||
if (this.callback) { | ||
this.callback(err); | ||
} | ||
} else { | ||
this.globNext(); | ||
} | ||
this.globNext(); | ||
}; | ||
@@ -132,0 +134,0 @@ |
{ | ||
"name": "glob-all", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Provide multiple patterns to node-glob", | ||
"main": "glob-all.js", | ||
"bin": { | ||
"glob-all": "./bin/glob-all" | ||
}, | ||
"scripts": { | ||
@@ -15,3 +18,4 @@ "prepublish": "./node_modules/coffee-script/bin/coffee -c -o ./ src/glob-all.coffee", | ||
"dependencies": { | ||
"glob": "^4.0.6" | ||
"glob": "^4.0.6", | ||
"yargs": "~1.2.6" | ||
}, | ||
@@ -18,0 +22,0 @@ "devDependencies": { |
@@ -5,2 +5,4 @@ # glob-all | ||
[![NPM version](https://nodei.co/npm/glob-all.png?compact=true)](https://npmjs.org/package/glob-all) | ||
### Install | ||
@@ -47,2 +49,23 @@ | ||
### CLI Usage | ||
`npm install -g glob-all` | ||
List all JavaScript files in `example/` | ||
``` | ||
$ glob-all 'example/**/*.js' | ||
example/async.js | ||
example/events.js | ||
example/order.js | ||
example/perf.js | ||
example/sync.js | ||
``` | ||
Or list all JavaScript files but ignore 3rd-party modules: | ||
``` | ||
$ glob-all '**/*.js' '!node_modules/**/*' | ||
``` | ||
### API | ||
@@ -49,0 +72,0 @@ |
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
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
10922
16
208
161
2
+ Addedyargs@~1.2.6
+ Addedminimist@0.1.0(transitive)
+ Addedyargs@1.2.6(transitive)