yog2-kernel
Advanced tools
Comparing version 0.0.24 to 0.0.25
{ | ||
"name": "yog2-kernel", | ||
"version": "0.0.24", | ||
"version": "0.0.25", | ||
"description": "yog2 kernel", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
var mapjson = require('./mapjson.js'); | ||
var yogView = require('yog-view'); | ||
var yogBigPipe = require('yog-bigpipe'); | ||
var _ = require('lodash'); | ||
@@ -19,7 +20,9 @@ module.exports.views = function(app, conf){ | ||
//设置view engine | ||
app.engine('tpl', yogView.init({ | ||
cache: conf.cache, | ||
engine: 'yog-swig' | ||
}, app)); | ||
_(conf.engine).forEach(function(engine, name){ | ||
//设置view engine | ||
app.engine(name, yogView.init({ | ||
cache: conf.cache, | ||
engine: engine | ||
}, app)); | ||
}); | ||
@@ -37,3 +40,6 @@ if (conf.cache){ | ||
confDir: yog.ROOT_PATH + '/conf/fis', | ||
bigpipe: true | ||
bigpipe: true, | ||
engine: { | ||
tpl: require('yog-swig') | ||
} | ||
}; |
31515
799