Comparing version 0.0.17 to 0.0.18
13
index.js
@@ -22,3 +22,3 @@ var response = require('./lib/response.js'); | ||
return function(filepath, locals, done) { | ||
// 关于 response 来源,请查看 hackResponse 方法。 | ||
@@ -30,3 +30,3 @@ // 以及 lib/reponse.js | ||
var options = _.mixin({}, settings); | ||
// 初始化 layer 层。 | ||
@@ -39,11 +39,6 @@ // 提供 addScript, addStyle, resolve, addPagelet 各种接口。 | ||
// 模本文件路径 | ||
options.view = filepath; | ||
new Engine(options, prototols) | ||
// 模板变量。 | ||
// locals._yog 用来指向 layer 层。 | ||
options.locals = _.mixin(locals, {_yog: prototols}); | ||
.makeStream(filepath, _.mixin(locals, {_yog: prototols})) | ||
new Engine(options, prototols) | ||
// 合并 tpl 流 和 bigpipe 流。 | ||
@@ -50,0 +45,0 @@ .pipe(combine(prototols)) |
{ | ||
"name": "yog-view", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"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", |
19582
480