@0x-jerry/x 2.4.1 → 2.4.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/dist/xn.js +4 -4
- package/package.json +1 -1
package/dist/xn.js
CHANGED
|
@@ -90,15 +90,15 @@ async function defaultAction() {
|
|
|
90
90
|
await runNpm("install");
|
|
91
91
|
}
|
|
92
92
|
async function installAction(_, opt) {
|
|
93
|
-
const
|
|
94
|
-
const installOnly = !
|
|
93
|
+
const parameters = opt._;
|
|
94
|
+
const installOnly = !parameters.length;
|
|
95
95
|
if (installOnly) {
|
|
96
96
|
await runNpm("install");
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
await runNpm("add", ...
|
|
99
|
+
await runNpm("add", ...parameters);
|
|
100
100
|
if (opt.types) {
|
|
101
|
-
const typesPackages =
|
|
101
|
+
const typesPackages = parameters.filter((n) => !n.startsWith("-")).map((pkg) => getTypePackageName(pkg));
|
|
102
102
|
await runNpm("add", ...typesPackages, "-D");
|
|
103
103
|
}
|
|
104
104
|
}
|