andoncloud-library-scripts 1.0.2 → 1.0.3
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/config/build.js +5 -0
- package/package.json +1 -1
- package/scripts/build-watch.js +20 -3
- package/scripts/build.js +20 -3
package/config/build.js
CHANGED
package/package.json
CHANGED
package/scripts/build-watch.js
CHANGED
|
@@ -21,10 +21,27 @@ function copyAssets() {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
(() => {
|
|
24
|
-
const
|
|
24
|
+
const argTypeIndex = argv.findIndex((arg) => arg === "--type");
|
|
25
|
+
|
|
26
|
+
let argType = "";
|
|
27
|
+
|
|
28
|
+
if (argTypeIndex !== -1) {
|
|
29
|
+
argType = argv[argTypeIndex + 1];
|
|
30
|
+
}
|
|
31
|
+
const argExternalIndex = argv.findIndex((arg) => arg === "--external");
|
|
32
|
+
|
|
33
|
+
let argExternal = "";
|
|
34
|
+
|
|
35
|
+
if (argExternalIndex !== -1) {
|
|
36
|
+
argExternal = argv[argExternalIndex + 1];
|
|
37
|
+
}
|
|
38
|
+
const baseExternal =
|
|
39
|
+
argType === "widget"
|
|
40
|
+
? buildConf.BASE_EXTERNAL + "," + buildConf.WIDGET_EXTERNAL
|
|
41
|
+
: buildConf.BASE_EXTERNAL;
|
|
25
42
|
const allExternal = argExternal
|
|
26
|
-
? `${
|
|
27
|
-
:
|
|
43
|
+
? `${baseExternal},${argExternal}`
|
|
44
|
+
: baseExternal;
|
|
28
45
|
const libVersion = require(paths.libPackageJson).version;
|
|
29
46
|
|
|
30
47
|
console.log(`\nBuilding version ${libVersion} in watch mode:`);
|
package/scripts/build.js
CHANGED
|
@@ -22,10 +22,27 @@ function copyAssets() {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
(async () => {
|
|
25
|
-
const
|
|
25
|
+
const argTypeIndex = argv.findIndex((arg) => arg === "--type");
|
|
26
|
+
|
|
27
|
+
let argType = "";
|
|
28
|
+
|
|
29
|
+
if (argTypeIndex !== -1) {
|
|
30
|
+
argType = argv[argTypeIndex + 1];
|
|
31
|
+
}
|
|
32
|
+
const argExternalIndex = argv.findIndex((arg) => arg === "--external");
|
|
33
|
+
|
|
34
|
+
let argExternal = "";
|
|
35
|
+
|
|
36
|
+
if (argExternalIndex !== -1) {
|
|
37
|
+
argExternal = argv[argExternalIndex + 1];
|
|
38
|
+
}
|
|
39
|
+
const baseExternal =
|
|
40
|
+
argType === "widget"
|
|
41
|
+
? buildConf.BASE_EXTERNAL + "," + buildConf.WIDGET_EXTERNAL
|
|
42
|
+
: buildConf.BASE_EXTERNAL;
|
|
26
43
|
const allExternal = argExternal
|
|
27
|
-
? `${
|
|
28
|
-
:
|
|
44
|
+
? `${baseExternal},${argExternal}`
|
|
45
|
+
: baseExternal;
|
|
29
46
|
const libVersion = require(paths.libPackageJson).version;
|
|
30
47
|
|
|
31
48
|
console.log(`\nBuilding version ${libVersion}:`);
|