forked from xRadioLAB/HackerX_slive
-
Notifications
You must be signed in to change notification settings - Fork 1
/
edp-build-config.js
68 lines (59 loc) · 1.5 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
/**
* @file config edp-build
* @author EFE
*/
/* globals LessCompiler, CssCompressor, JsCompressor, PathMapper, AddCopyright, ModuleCompiler, TplMerge */
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();
var cssProcessor = new CssCompressor();
var moduleProcessor = new ModuleCompiler();
var jsProcessor = new JsCompressor();
var pathMapperProcessor = new PathMapper();
var addCopyright = new AddCopyright();
return {
'default': [
lessProcessor, moduleProcessor, pathMapperProcessor
],
'release': [
lessProcessor, cssProcessor, 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'
];
/* eslint-disable guard-for-in */
exports.injectProcessor = function(processors) {
for (var key in processors) {
global[key] = processors[key];
}
};