Comparing version 0.4.0 to 0.5.0
@@ -114,3 +114,2 @@ var path = require('path'); | ||
var createHanlder = module.exports = function (res, options) { | ||
options = _.mixin(_.mixin({}, defaultOptions), options); | ||
@@ -153,3 +152,3 @@ | ||
var timeused = 0; | ||
// var timeused = 0; | ||
@@ -179,3 +178,2 @@ var changed = false; | ||
} | ||
dep.id = depId; | ||
depList = depList.concat(getDepList(dep, added)); | ||
@@ -208,3 +206,2 @@ depList.push(dep); | ||
} | ||
dep.id = depId; | ||
asyncList = asyncList.concat(getAsyncList(dep, added, depScaned)); | ||
@@ -221,3 +218,2 @@ }); | ||
} | ||
async.id = asyncId; | ||
asyncList = asyncList.concat(getAsyncList(async, added, depScaned)); | ||
@@ -235,3 +231,2 @@ //异步资源依赖需要递归添加所有同步依赖 | ||
changed = true; | ||
file.id = id; | ||
var depList = getDepList(file, addedSync); | ||
@@ -387,2 +382,10 @@ var asyncList = getAsyncList(file, addedAsync, depScaned); | ||
usedSync[res.id] = true; | ||
if (res.deps) { | ||
res.deps.forEach(function (dep) { | ||
var file = fis.getInfo(dep, true); | ||
if (file) { | ||
me.addResourceToList(file); | ||
} | ||
}); | ||
} | ||
if (res.pkg) { | ||
@@ -410,4 +413,5 @@ var pkg = fis.getPkgInfo(res.pkg); | ||
} | ||
else if (res.type === 'css') | ||
else if (res.type === 'css') { | ||
cssList.push(res.uri); | ||
} | ||
}, | ||
@@ -440,2 +444,3 @@ | ||
}); | ||
}, | ||
@@ -492,3 +497,2 @@ | ||
filter: function (content) { | ||
content = this.filterJs(content); | ||
@@ -495,0 +499,0 @@ |
{ | ||
"name": "yog-view", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "An express.js middleware for optimizing the order of js\\css output, and enabling render template in bigpipe mode.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
23730
606