enablement-build-template-generate 1.0.8 → 1.0.11
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 +10 -11
- package/package.json +2 -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,6 @@ 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
|
-
|
|
46
|
-
if(search.length) {
|
|
47
|
-
for(let i=0;i<search.length;i++) {
|
|
48
|
-
search[i]='!**/'+search[i];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
search.unshift(`./**/package.json`);
|
|
53
|
-
search.push(`!**/node_modules`);
|
|
54
53
|
|
|
55
54
|
globby(search,{ cwd: cwd }).then((images)=>{
|
|
56
55
|
images.sort();
|
|
@@ -134,7 +133,7 @@ for (let i = 2; i < argv.length; i++) {
|
|
|
134
133
|
if (argv[i].substring(0, 2) === "--") {
|
|
135
134
|
let name = argv[i].substring(2);
|
|
136
135
|
if (name==="exclude") {
|
|
137
|
-
options[name] = argv[i + 1].split(',');
|
|
136
|
+
options[name] = argv[i + 1].replace(/\s/g,',').split(',');
|
|
138
137
|
i++;
|
|
139
138
|
} else if (options[name] !== undefined) {
|
|
140
139
|
options[name] = argv[i + 1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enablement-build-template-generate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Generates build yaml for mono repos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"globby": "^14.0.1"
|
|
11
11
|
},
|
|
12
|
+
|
|
12
13
|
"scripts": {
|
|
13
14
|
"start": "node index.js"
|
|
14
15
|
},
|