Comparing version 0.0.20 to 0.0.21
@@ -189,6 +189,2 @@ var path = require('path'); | ||
if (!async || type == 'css') { | ||
//skip framework load | ||
if (uri === framework){ | ||
return uri; | ||
} | ||
syncs[type] = syncs[type] || []; | ||
@@ -350,4 +346,15 @@ syncs[type].push(uri); | ||
rMap['res'][id] = { | ||
'url': res['uri'], | ||
'deps': res['deps'] || [], | ||
'url': res['uri'] | ||
}; | ||
// 异步资源的deps中剔除非JS资源 | ||
var deps = res['deps'].filter(function(dep){ | ||
var info = fis.getInfo(dep, true); | ||
if (info.isJsLike){ | ||
return true; | ||
} | ||
}) || []; | ||
if (deps.length !== 0){ | ||
rMap['res'][id].deps = deps; | ||
} | ||
@@ -387,4 +394,6 @@ | ||
var loadModjs = !!framework; | ||
var loadModjs = (jses || resourceMap) && framework; | ||
var p; | ||
if (loadModjs) { | ||
@@ -391,0 +400,0 @@ data.framework = framework; |
{ | ||
"name": "yog-view", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"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", |
489
20229