-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfis-conf.js
65 lines (57 loc) · 1.27 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
/**
* Created by vengean on 15/10/13.
*/
fis.match('::packager', {
spriter: fis.plugin('csssprites'),
postpackager: fis.plugin('loader', {
resourceType: 'amd',
useInlineMap: true
})
});
fis.match('*.{js,css,png,less}', {
useHash: false
});
fis.match('*.css', {
// 给匹配到的文件分配属性 `useSprite`
useSprite: true
});
fis.match('*.js', {
optimizer: fis.plugin('uglify-js')
//isMod: true
});
fis.match('*.less', {
rExt: '.css',
parser: fis.plugin('less')
});
fis.match('*.{css,less}', {
useSprite: true,
optimizer: fis.plugin('clean-css')
});
fis.match('*.png', {
optimizer: fis.plugin('png-compressor')
});
fis.media('debug').match('*.{js,css,png,less}', {
useHash: false,
useSprite: false,
optimizer: null
});
fis.hook('amd', {
paths: {
jquery: 'vendor/jquery/jquery-1.11.3',
avalon: "vendor/avalon/avalon.shim",
text: 'vendor/require/text',
domReady: 'vendor/require/domReady',
css: 'vendor/require/css',
md5: 'components/md5/md5',
ajax: 'components/ajax/ajax'
},
shim: {
jquery: {
exports: "jQuery"
},
avalon: {
exports: "avalon"
}
},
globalAsyncAsSync: true
});