-
Notifications
You must be signed in to change notification settings - Fork 0
/
fis-conf.js
executable file
·64 lines (50 loc) · 1.51 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
var pkg = require('./package.json');
var fs = require('fs');
fis.config.set('static.path', 'frontend');
fis.config.set('static.serverp', pkg.name);
// fis.config.set('static.path', 'frontend');
// 默认及过滤需要产出的文件
fis.match('**', {
release: false
});
fis.match('${static.path}/font/(**)', {
release: '${static.serverp}/font/$1'
});
fis.match('${static.path}/images/(**)', {
// useHash: true,
release: '${static.serverp}/images/$1',
optimizer: fis.plugin('png-compressor')
});
// 产出压缩CSS
// fis.match('::package', {
// postpackager: fis.plugin('loader')
// });
fis.match('${static.path}/css/(**.css)', {
release: '${static.path}/css/$1',
optimizer: fis.plugin('clean-css'),
useHash: true
});
fis.match('${static.path}/css/**.css', {
packTo: '${static.path}/css/css.css'
});
// 产出 模块化js
// fis.match('::package', {
// postpackager: fis.plugin('loader')
// });
fis.match('${static.path}/(**.js)', {
release: '${static.path}/$1',
// optimizer: fis.plugin('uglify-js')
// isMod: true
});
fis.match('${static.path}/{component/**.js,js/**.js}', {
optimizer: fis.plugin('uglify-js')
// isMod: true
});
fis.match('${static.path}/{component/**.js,js/**.js,modules/**.js,router/app.js}', {
useHash: true,
packTo: '${static.path}/js/script.js'
});
// fis.match('${static.path}/component/**.js', {
// useHash: true,
// packTo: '${static.path}/js/component.js'
// });