forked from ecomfe/esui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
edp-build-config.js
61 lines (54 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
exports.input = __dirname;
var path = require( 'path' );
exports.output = path.resolve( __dirname, 'output' );
// var moduleEntries = 'html,htm,phtml,tpl,vm,js';
// var pageEntries = 'html,htm,phtml,tpl,vm';
exports.getProcessors = function () {
var lessProcessor = new LessCompiler({
files: ['src/css/main.less']
});
var moduleProcessor = new ModuleCompiler({
files: ['!src/customShim.js']
});
var jsProcessor = new JsCompressor();
var pathMapperProcessor = new PathMapper();
var addCopyright = new AddCopyright();
return {
'default': [ lessProcessor, moduleProcessor, pathMapperProcessor ],
'release': [
lessProcessor, moduleProcessor,
jsProcessor, pathMapperProcessor, addCopyright
]
};
};
exports.exclude = [
'tool',
'doc',
'test',
'module.conf',
'dep/packages.manifest',
'dep/*/*/test',
'dep/*/*/doc',
'dep/*/*/demo',
'dep/*/*/tool',
'dep/*/*/*.md',
'dep/*/*/package.json',
'edp-*',
'.edpproj',
'.svn',
'.git',
'.gitignore',
'.idea',
'.project',
'Desktop.ini',
'Thumbs.db',
'.DS_Store',
'*.tmp',
'*.bak',
'*.swp'
];
exports.injectProcessor = function ( processors ) {
for ( var key in processors ) {
global[ key ] = processors[ key ];
}
};