enablement-build-template-generate 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +11 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -28,6 +28,15 @@ async function main(options) {
|
|
|
28
28
|
|
|
29
29
|
const plist = [];
|
|
30
30
|
|
|
31
|
+
let search = options.exclude;
|
|
32
|
+
if(search.length) {
|
|
33
|
+
for(let i=0;i<search.length;i++) {
|
|
34
|
+
search[i]='!**/'+search[i];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
search.unshift(`./**/package.json`);
|
|
38
|
+
search.push(`!**/node_modules`);
|
|
39
|
+
|
|
31
40
|
Object.keys(config).forEach((templateFilename)=>{
|
|
32
41
|
|
|
33
42
|
plist.push(new Promise(async (primaryResolve, reject) => {
|
|
@@ -41,16 +50,9 @@ async function main(options) {
|
|
|
41
50
|
const cwd = path.join(templatePath, jobConfig.rootPath);
|
|
42
51
|
|
|
43
52
|
let jobRoot = jobConfig.rootPath.replace(/^[\.\/\\]+/, '');
|
|
44
|
-
let search = options.exclude;
|
|
45
53
|
|
|
46
|
-
if(search.length) {
|
|
47
|
-
for(let i=0;i<search.length;i++) {
|
|
48
|
-
search[i]='!**/'+search[i];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
search.push(`!**/node_modules`);
|
|
55
|
+
console.log(search);
|
|
54
56
|
|
|
55
57
|
globby(search,{ cwd: cwd }).then((images)=>{
|
|
56
58
|
images.sort();
|
|
@@ -134,7 +136,7 @@ for (let i = 2; i < argv.length; i++) {
|
|
|
134
136
|
if (argv[i].substring(0, 2) === "--") {
|
|
135
137
|
let name = argv[i].substring(2);
|
|
136
138
|
if (name==="exclude") {
|
|
137
|
-
options[name] = argv[i + 1].split(',');
|
|
139
|
+
options[name] = argv[i + 1].replace(/\s/g,',').split(',');
|
|
138
140
|
i++;
|
|
139
141
|
} else if (options[name] !== undefined) {
|
|
140
142
|
options[name] = argv[i + 1];
|