Comparing version 1.1.0 to 1.1.1
// Generated by CoffeeScript 1.7.1 | ||
(function() { | ||
var minimatch, path, through; | ||
var Minimatch, path, through; | ||
through = require("through"); | ||
minimatch = require("minimatch"); | ||
Minimatch = require("minimatch").Minimatch; | ||
@@ -12,3 +12,3 @@ path = require("path"); | ||
module.exports = function(patterns, options) { | ||
var files, onEnd, onFile, rank, relative; | ||
var files, matchers, onEnd, onFile, rank, relative; | ||
if (patterns == null) { | ||
@@ -21,2 +21,8 @@ patterns = []; | ||
files = []; | ||
matchers = patterns.map(function(pattern) { | ||
if (pattern.indexOf("./") === 0) { | ||
throw new Error("Don't start patterns with `./` - they will never match. Just leave out `./`"); | ||
} | ||
return Minimatch(pattern); | ||
}); | ||
onFile = function(file) { | ||
@@ -33,10 +39,10 @@ return files.push(file); | ||
rank = function(s) { | ||
var index, pattern, _i, _len; | ||
for (index = _i = 0, _len = patterns.length; _i < _len; index = ++_i) { | ||
pattern = patterns[index]; | ||
if (minimatch(s, pattern)) { | ||
var index, matcher, _i, _len; | ||
for (index = _i = 0, _len = matchers.length; _i < _len; index = ++_i) { | ||
matcher = matchers[index]; | ||
if (matcher.match(s)) { | ||
return index; | ||
} | ||
} | ||
return patterns.length; | ||
return matchers.length; | ||
}; | ||
@@ -43,0 +49,0 @@ onEnd = function() { |
{ | ||
"name": "gulp-order", | ||
"description": "The gulp plugin `gulp-order` allows you to reorder a stream of files using the same syntax as of `gulp.src`.", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Marcel Jackwerth", |
Sorry, the diff of this file is not supported yet
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
8295
64