-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedp-watch-config.js
50 lines (43 loc) · 1.1 KB
/
edp-watch-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
/**
* @file watch配置
* @author edpx-mobile
*/
exports.baseDir = __dirname;
var globalFilters = {
ignoreNodeModules: '!(node_modules/*|*/node_modules/*)',
ignoreEdpPackages: '!dep/*',
ignoreVCSFiles : '!(*).(git|svn|idea)/*',
ignoreIDEFiles : '!(*).(DS_Store)',
ignoreNodeConfig : '!(*)(.gitignore|packkage.json|*.md)'
};
var commonFilters = {
staticFiles: '*.(tpl|html|js|coffee|less|styl|css|xml)',
mediaFiles: '*.(gif|jpg|jpeg|png|swf|fla|mp3)'
};
exports.globalFilters = globalFilters;
exports.getTasks = function () {
return {
'livereload': {
filters: [
commonFilters.staticFiles,
commonFilters.staticFiles
],
events: [
'addedFiles',
'modifiedFiles'
],
plugins: livereload(),
intervalTime: 3000
}
};
};
exports.getGroups = function () {
return {
'default': ['livereload']
};
};
exports.injectPlugin = function (plugins) {
for (var key in plugins) {
global[key] = plugins[key];
}
};