Comparing version 2.0.1 to 2.0.2
@@ -57,2 +57,3 @@ var _ = alp._; | ||
this.useCompile = !_.filter(absUrl, config.get('exclude')); | ||
this.mtime = this.getMtime(); | ||
} | ||
@@ -87,3 +88,3 @@ | ||
getMtime: function () { | ||
return _.mtime(this.origin); | ||
return +_.mtime(this.realpath); | ||
}, | ||
@@ -90,0 +91,0 @@ addRequire : function(id){ |
@@ -523,3 +523,3 @@ var esprima = require('esprima'); | ||
_compile: function (src) { | ||
var file; | ||
var file, cacheFile; | ||
@@ -534,4 +534,6 @@ if (src instanceof File) { | ||
cacheFile = storage[file.subpath]; | ||
// 同一个html中可以写多个脚本块,所以这里不做判定 | ||
if (!file.isLikeHtml && file.subpath in storage) { | ||
if (!file.isLikeHtml && file.subpath in storage && file.mtime === cacheFile.mtime) { | ||
return; | ||
@@ -538,0 +540,0 @@ } |
{ | ||
"name": "alpaca-sm", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"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
49707
1272