-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfis-conf.js
81 lines (67 loc) · 1.64 KB
/
fis-conf.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
// fis.set('project.files', '*.{html,tpl}');
fis
.match('*.{html,tpl}', {
parser: fis.plugin('rosetta', {
compileUsage: false
})
})
.match('*.tpl', {
release: '/template/$0'
})
.match('/elements/r-*.html', {
rExt: '.js'
})
.match('/elements/*.*', {
release: '/static/$0'
})
.match('/components/**/r-*.html', {
rExt: '.js'
})
.match('/components/(**/*.*)', {
useMap: true,
release: '/static/$1'
})
.match('*.{tpl,html,js}', {
preprocessor: fis.plugin('rosetta-import')
})
.match('::packager', {
postpackager: fis.plugin('rosetta', {
allInOne: false
})
});
// 在 dev 环境下关闭文件 md5 hash
fis
.media('dev')
.match('*.{css,js,html}', {
useHash: false
})
// .set('deploy', {
// receiver: 'http://dbl-dev-rd22.vm.baidu.com:8343/receiver',
// from: '/',
// subOnly: true,
// to: '/home/work/webroot/templates/templates/eva_zhidaorder_gao'
// })
// fis3 release production
fis
.media('production')
// 压缩 js 通过 uglify
.match('*.js', {
optimizer: fis.plugin('uglify-js')
})
// 这里面也是 js
.match('/elements/*.html', {
optimizer: fis.plugin('uglify-js')
})
// 压缩 css
.match('*.css', {
optimizer: fis.plugin('clean-css')
})
// 压缩 png
.match('*.png', {
optimizer: fis.plugin('png-compressor')
})
// .match('::packager', {
// postpackager: fis.plugin('rosetta', {
// allInOne: true
// })
// });