Comparing version 2.0.8 to 2.0.9
@@ -55,3 +55,3 @@ var _ = alp._; | ||
} | ||
this.useCompile = _.filter(absUrl, config.get('include')) && !_.filter(absUrl, config.get('exclude')); | ||
this.useCompile = _.filter1(absUrl, config.get('include'), config.get('exclude')); | ||
this.mtime = this.getMtime(); | ||
@@ -58,0 +58,0 @@ } |
@@ -499,4 +499,32 @@ var fs = require('fs'); | ||
if (_.isEmpty(list)) { | ||
list = null; | ||
} | ||
return match(str, list); | ||
}; | ||
_.filter1 = function (str, include, exclude) { | ||
var isInclude, isExclude; | ||
if (_.is(include, 'array') && _.isEmpty(include)) { | ||
include = null; | ||
} | ||
if (_.is(exclude, 'array') && _.isEmpty(exclude)) { | ||
exclude = null; | ||
} | ||
if (include) { | ||
isInclude = _.filter(str, include); | ||
} else { | ||
isInclude = true; | ||
} | ||
if (exclude) { | ||
isExclude = _.filter(str, exclude); | ||
} | ||
return isInclude && !isExclude; | ||
}; | ||
_.find = function(rPath, include, root) { | ||
@@ -503,0 +531,0 @@ var list = [], |
{ | ||
"name": "alpaca-sm", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "分析Html文件依赖的js文件和css文件", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
52039
1335