forked from fex-team/fis-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fis-plus.js
122 lines (119 loc) · 3.15 KB
/
fis-plus.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
118
119
120
121
122
var fis = module.exports = require('fis');
fis.cli.name = "fis-plus";
fis.cli.info = fis.util.readJSON(__dirname + '/package.json');
fis.require.prefixes = ['fisp', 'fis'];
fis.config.merge({
statics: '/static',
server: {
rewrite: true,
libs: 'pc',
clean: {
exclude: "fisdata**,smarty**,rewrite**,index.php**,WEB-INF**"
}
},
modules : {
parser : {
less : 'less',
tmpl: 'bdtmpl',
po: 'po'
},
preprocessor: {
tpl: 'extlang'
},
postprocessor: {
tpl: 'require-async',
js: 'jswrapper, require-async'
},
optimizer : {
tpl : 'smarty-xss,html-compress'
},
prepackager: 'widget-inline,js-i18n'
},
roadmap : {
ext : {
less : 'css',
tmpl : 'js',
po : 'json'
},
path : [
// i18n
{
reg: '/fis_translate.tpl',
release: '/template/${namespace}/widget/fis_translate.tpl'
},
{
reg: /\/lang\/([^\/]+)\.po/i,
release: '/config/lang/${namespace}.$1.po'
},
//i18n end
{
reg : /^\/widget\/(.*\.tpl)$/i,
isMod : true,
url : '${namespace}/widget/$1',
release : '/template/${namespace}/widget/$1'
},
{
reg : /^\/widget\/(.*\.(js|css))$/i,
isMod : true,
release : '${statics}/${namespace}/widget/$1'
},
{
reg : /^\/page\/(.+\.tpl)$/i,
isMod: true,
release : '/template/${namespace}/page/$1',
extras: {
isPage: true
}
},
{
reg : /\.tmpl$/i,
release : false
},
{
reg: /^\/(static)\/(.*)/i,
release: '${statics}/${namespace}/$2'
},
{
reg: /^\/(config|test)\/(.*)/i,
isMod: false,
release: '/$1/${namespace}/$2'
},
{
reg : /^\/(plugin|smarty\.conf$)|\.php$/i
},
{
reg : 'server.conf',
release : '/server-conf/${namespace}.conf'
},
{
reg: "domain.conf",
release: '/config/$&'
},
{
reg: "build.sh",
release: false
},
{
reg : '${namespace}-map.json',
release : '/config/${namespace}-map.json'
},
{
reg: /^.+$/,
release: '${statics}/${namespace}$&'
}
]
},
settings : {
parser : {
bdtmpl : {
LEFT_DELIMITER : '<#',
RIGHT_DELIMITER : '#>'
}
},
postprocessor : {
jswrapper: {
type: 'amd'
}
}
}
});