yog2-kernel
Advanced tools
Comparing version 0.0.25 to 0.1.0
{ | ||
"name": "yog2-kernel", | ||
"version": "0.0.25", | ||
"version": "0.1.0", | ||
"description": "yog2 kernel", | ||
@@ -42,4 +42,4 @@ "main": "index.js", | ||
"yog-log": "0.0.x", | ||
"yog-swig": "0.0.x", | ||
"yog-view": "0.0.x" | ||
"yog-swig": "0.1.x", | ||
"yog-view": "0.1.x" | ||
}, | ||
@@ -46,0 +46,0 @@ "devDependencies": { |
@@ -10,6 +10,12 @@ var mapjson = require('./mapjson.js'); | ||
//初始化map.json API | ||
var resourceApi = mapjson({ | ||
config_dir: conf.confDir | ||
app.fis = new mapjson.ResourceApi(conf.confDir); | ||
middleware.push(function(req, res, next){ | ||
// 关闭缓存时,刷新mapjson对象 | ||
if (!conf.cache){ | ||
app.fis = new mapjson.ResourceApi(conf.confDir); | ||
} | ||
res.fis = app.fis; | ||
next(); | ||
}); | ||
middleware.push(resourceApi); | ||
@@ -21,2 +27,4 @@ //初始化bigpipe | ||
app.set('views', conf.viewsDir); | ||
_(conf.engine).forEach(function(engine, name){ | ||
@@ -41,2 +49,3 @@ //设置view engine | ||
confDir: yog.ROOT_PATH + '/conf/fis', | ||
viewsDir: yog.ROOT_PATH + '/views', | ||
bigpipe: true, | ||
@@ -43,0 +52,0 @@ engine: { |
@@ -71,3 +71,2 @@ var fs = require('fs'); | ||
} | ||
map_json = path.join(this.config_dir, map_json); | ||
@@ -74,0 +73,0 @@ |
31789
806
+ Addedswig@1.4.2(transitive)
+ Addedyog-swig@0.1.2(transitive)
+ Addedyog-view@0.1.6(transitive)
- Removedswig@1.3.2(transitive)
- Removedyog-swig@0.0.18(transitive)
- Removedyog-view@0.0.28(transitive)
Updatedyog-swig@0.1.x
Updatedyog-view@0.1.x