Comparing version 2.0.7 to 2.0.8
@@ -12,2 +12,5 @@ var CONFIG = { | ||
// 命中的文件才会做模块分析。 | ||
include: [], | ||
// 排除一些文本类型 | ||
@@ -14,0 +17,0 @@ excludeTxtType: [], |
@@ -55,3 +55,3 @@ var _ = alp._; | ||
} | ||
this.useCompile = !_.filter(absUrl, config.get('exclude')); | ||
this.useCompile = _.filter(absUrl, config.get('include')) && !_.filter(absUrl, config.get('exclude')); | ||
this.mtime = this.getMtime(); | ||
@@ -58,0 +58,0 @@ } |
@@ -273,2 +273,3 @@ var esprima = require('esprima'); | ||
key, | ||
_absUrl, | ||
parentNotExpressionOrSequence; | ||
@@ -290,2 +291,8 @@ | ||
} | ||
//处理require('xx'),但是xx不存在的问题; | ||
_absUrl = path.resolve(_.unix(config.get('fileBasedRoot') ? config.get('root') : file.dirname || config.get('root')), requireValue); | ||
if (!_.exists(_absUrl)) { | ||
alp.log.warning(file.realpath + '文件:require(' + requireValue + ') 文件不存在'); | ||
return node; | ||
} | ||
rFile = new File(requireValue, file.dirname); | ||
@@ -292,0 +299,0 @@ file.hasRequire = true; |
{ | ||
"name": "alpaca-sm", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "分析Html文件依赖的js文件和css文件", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -69,2 +69,6 @@ # alpaca-sm | ||
默认值:[] | ||
####include | ||
解释:命中的文件才会被处理 | ||
类型:array | string | RegExp | ||
默认值:[] | ||
####isOptimizer | ||
@@ -71,0 +75,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
51533
1314
98