-
Notifications
You must be signed in to change notification settings - Fork 0
/
cdkit.config.js
76 lines (64 loc) · 1.6 KB
/
cdkit.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
// 批量修改名称配置文件
// cdkit find -c script/cdkit.config.js
// cdkit replace -c script/cdkit.config.js
const fromName = /aaa/;
const toName = 'bbb';
const libList = [
'base',
'type',
'is',
'inherits',
'extend',
'clone',
'event',
'guid',
'pubsub',
'querystring',
'url',
'md5',
'base64',
'load',
'console',
];
const config = [
{
root: '../',
excludePath: ['node_modules'],
rules: [
{
test: function (pathname) {
if (pathname.indexOf('package.json') > -1) {
return true;
}
return false;
if (pathname.indexOf('dist') > -1) {
return false
}
if (pathname.indexOf('package-lock') > -1) {
return false
}
if (pathname.indexOf('docs') > -1) {
return false
}
if (pathname.indexOf('site') > -1) {
return false
}
if (pathname.indexOf('.git') > -1) {
return false
}
if (pathname.indexOf('cdkit.config.js') > -1) {
return false
}
return true;
},
replace: [
{
from: fromName,
to: toName,
}
]
}
]
}
];
module.exports = config;