-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathyogurt.js
117 lines (97 loc) · 2.59 KB
/
yogurt.js
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
var fis = module.exports = require('fis');
// 让 jello 打头的先加载。
fis.require.prefixes.unshift('yogurt');
fis.cli.name = 'yogurt';
fis.cli.info = fis.util.readJSON(__dirname + '/package.json');
fis.config.merge({
statics: '/public',
server: {
type: 'node',
rewrite: 'index.js',
clean: {
exclude: "controllers/*,config/config.json,config/development.json,locales/*,models/*,server.js"
}
},
modules: {
parser: {
less: 'less',
sass: 'sass',
scss: 'sass',
tmpl: 'bdtmpl',
po: 'po'
},
preprocessor: {
tpl: 'extlang'
},
postprocessor: {
tpl: 'require-async',
js: 'jswrapper, require-async'
}
},
roadmap: {
ext: {
less: 'css',
sass: 'css',
scss: 'css',
tmpl: 'js',
po: 'json'
},
path: [
{
reg: /^\/widget\/(.*\.tpl)$/i,
isMod: true,
url: '${namespace}/widget/$1',
release: '/views/${namespace}/widget/$1'
},
{
reg: /^\/widget\/(.*\.(js|css))$/i,
isMod: true,
url: '/${namespace}/widget/$1',
release: '${statics}/${namespace}/widget/$1'
},
{
reg: /^\/page\/(.+\.tpl)$/i,
isMod: true,
release: '/views/${namespace}/$1',
url: '${namespace}/$1',
extras: {
isPage: true
}
},
{
reg: /^\/(static)\/(.*)/i,
url: '/${namespace}/$2',
release: '${statics}/${namespace}/$2'
},
{
reg: /^\/(test)\/(.*)/i,
isMod: false,
release: '/$1/${namespace}/$2'
},
{
reg: 'server.conf',
release: '/config/server.conf'
},
{
reg: "**.sh",
release: false
},
{
reg: '${namespace}-map.json',
release: '/config/${namespace}-map.json'
},
{
reg: /^.+$/,
url: '/${namespace}$&',
release: '${statics}/${namespace}$&'
}
]
},
settings: {
postprocessor: {
jswrapper: {
type: 'amd'
}
}
}
});