forked from ss1121/FKP-REST
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.js
More file actions
45 lines (41 loc) · 1.05 KB
/
render.js
File metadata and controls
45 lines (41 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* Module dependencies.
*/
var views = require('co-views-helpers');
var config = require('../config')
// setup views mapping .html
// to the handlebars template engine
// render = views('../public/dist/1.0.0/html/', {
// render = views(config.static.html, {
// map: { html: 'handlebars' }
// });
function setRender(stat){
console.log('模板渲染')
console.log('================='+__filename+' setRender');
console.log('-');
console.log('-');
console.log('-');
if(stat && stat==='dev'){
return views(config.static.test.html, {
map: { html: 'handlebars' }
});
}
else{
if (stat
&&
(stat === 'ngdev'
|| stat === 'ngpro'
|| stat === 'avdev'
|| stat === 'avpro')
){
return views(config.static.html, {
map: { html: 'swig' }
});
}
else
return views(config.static.html, {
map: { html: 'handlebars' }
});
}
}
module.exports = setRender