Comparing version 2.0.3 to 2.0.4
@@ -94,5 +94,5 @@ var _ = alp._; | ||
}, | ||
updateMd5: function(content) { | ||
buildMd5: function(content) { | ||
if (typeof content === 'undefined') { | ||
content = this.getContent(); | ||
content = this.getRawContent(); | ||
} | ||
@@ -99,0 +99,0 @@ this.md5 = _.md5(content); |
@@ -536,6 +536,11 @@ var esprima = require('esprima'); | ||
this.contentProcessor(file); | ||
// 同一个html中可以写多个脚本块,所以这里不做判定 | ||
if (!file.isLikeHtml && file.subpath in storage && file.mtime === cacheFile.mtime && file.updateMd5() === cacheFile.md5) { | ||
return; | ||
if (!file.isLikeHtml && file.subpath in storage && file.mtime === cacheFile.mtime) { | ||
if (cacheFile.md5) { | ||
if (file.md5 == cacheFile.md5) { | ||
return; | ||
} | ||
} else { | ||
return; | ||
} | ||
} | ||
@@ -556,5 +561,7 @@ | ||
content = this.cntProcessor(file); | ||
file.buildMd5(content); | ||
file.setContent(content); | ||
return content; | ||
} else { | ||
file.buildMd5(); | ||
return file.getContent(); | ||
@@ -561,0 +568,0 @@ } |
{ | ||
"name": "alpaca-sm", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"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
50603
1299