Comparing version 0.1.4 to 0.1.5
@@ -171,9 +171,6 @@ var path = require('path'); | ||
var dep = fis.getInfo(depId, true); | ||
if (dep.type !== 'js' && dep.type !== 'css'){ | ||
if (!dep || (dep.type !== 'js' && dep.type !== 'css')){ | ||
return; | ||
} | ||
dep.id = depId; | ||
if (!dep){ | ||
return false; | ||
} | ||
depList = depList.concat(getDepList(dep, added)); | ||
@@ -203,9 +200,6 @@ depList.push(dep); | ||
var dep = fis.getInfo(depId, true); | ||
if (dep.type !== 'js' && dep.type !== 'css'){ | ||
if (!dep || (dep.type !== 'js' && dep.type !== 'css')){ | ||
return; | ||
} | ||
dep.id = depId; | ||
if (!dep){ | ||
return false; | ||
} | ||
asyncList = asyncList.concat(getAsyncList(dep, added, depScaned)); | ||
@@ -219,9 +213,6 @@ }); | ||
var async = fis.getInfo(asyncId, true); | ||
async.id = asyncId; | ||
if (async.type !== 'js' && async.type !== 'css'){ | ||
if (!async || (async.type !== 'js' && async.type !== 'css')){ | ||
return; | ||
} | ||
if (!async){ | ||
return false; | ||
} | ||
async.id = asyncId; | ||
asyncList = asyncList.concat(getAsyncList(async, added, depScaned)); | ||
@@ -452,3 +443,3 @@ //异步资源依赖需要递归添加所有同步依赖 | ||
var info = fis.getInfo(dep, true); | ||
if (info.type === 'js'){ | ||
if (info && info.type === 'js'){ | ||
return true; | ||
@@ -455,0 +446,0 @@ } |
{ | ||
"name": "yog-view", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"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", |
@@ -5,1 +5,7 @@ yog-view | ||
An express.js middleware for optimizing the order of js\css output, and enabling render template in bigpipe mode. | ||
## Notice | ||
yog-view 0.0.x is compatible with [yog](https://github.com/fex-team/yogurt) | ||
yog-view 0.1.x is compatible with [yog2](https://github.com/fex-team/yog2) |
11
22975
554