-
Notifications
You must be signed in to change notification settings - Fork 32
/
edp-build-config.js
77 lines (62 loc) · 1.33 KB
/
edp-build-config.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
/**
* @file build script
* @author Leon([email protected])
*/
exports.input = __dirname;
exports.output = require( 'path' ).resolve( __dirname, 'output' );
exports.getProcessors = function () {
var lessProcessor = new LessCompiler();
var cssProcessor = new CssCompressor();
var moduleProcessor = new ModuleCompiler({
bizId: 'moye'
});
var jsProcessor = new JsCompressor();
var asset = new PathMapper();
var addCopyright = new AddCopyright();
return {
'default': [
lessProcessor, cssProcessor,
moduleProcessor,
jsProcessor,
asset,
addCopyright
]
};
};
exports.exclude = [
'example',
'tool',
'doc',
'test',
'dep',
'*.log',
'node_modules',
'module.conf',
'demo',
'dep/packages.manifest',
'dep/*/*/test',
'dep/*/*/doc',
'dep/*/*/demo',
'dep/*/*/tool',
'dep/*/*/*.md',
'dep/*/*/package.json',
'edp-*',
'.*',
'Gruntfile.js',
'CHANGELOG.md',
'package.json',
'README.md',
'Desktop.ini',
'Thumbs.db',
/^api\//,
/^public\//,
'bower.json',
'db.json',
'doc.sh',
'jsdoc.json'
];
exports.injectProcessor = function ( processors ) {
for ( var key in processors ) {
global[ key ] = processors[ key ];
}
};