-
Notifications
You must be signed in to change notification settings - Fork 2
/
fis-conf.js
64 lines (54 loc) · 1.2 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
/**
* @file fis-conf.js
* @author oott123
*/
/* global fis */
fis.hook('amd');
fis.hook('node_modules');
fis.set('project.files', [
'src/**',
'test/**'
]);
fis.set('project.ignore', [
'dist/**',
'build/**'
]);
fis.match('/(node_modules/micro-event/**).js', {
isMod: true,
packTo: 'packed/iframe-shell.js',
moduleId: 'iframe-shell/deps/$1'
});
fis.match('src/(**).js', {
isMod: true,
packTo: 'packed/iframe-shell.js',
moduleId: 'iframe-shell/$1'
});
fis.match('src/index.js', {
moduleId: 'iframe-shell'
});
fis.match('test/(**).js', {
isMod: true,
moduleId: 'iframe-shell-test/$1'
});
fis.media('prod').match('/node_modules/micro-event/**.js', {
packTo: 'packed/iframe-shell.min.js',
optimizer: fis.plugin('uglify-js', {
mangle: {
expect: 'exports, module, require, define'
},
compress: {
drop_console: true
}
})
});
fis.media('prod').match('src/(**).js', {
packTo: 'packed/iframe-shell.min.js',
optimizer: fis.plugin('uglify-js', {
mangle: {
expect: 'exports, module, require, define'
},
compress: {
drop_console: true
}
})
});