mono-jsx-dom 0.1.6 → 0.1.7
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/bin/build.mjs +4 -3
- package/bin/dev.mjs +4 -3
- package/bin/init.mjs +2 -2
- package/package.json +1 -1
package/bin/build.mjs
CHANGED
|
@@ -15,14 +15,15 @@ function parseFlags() {
|
|
|
15
15
|
const arg = args[i];
|
|
16
16
|
if (arg.startsWith("--")) {
|
|
17
17
|
if (arg.includes("=")) {
|
|
18
|
-
const [key, value] = arg.split("=", 2);
|
|
18
|
+
const [key, value] = arg.slice(2).split("=", 2);
|
|
19
19
|
flags[key] = value;
|
|
20
20
|
} else {
|
|
21
|
+
const key = arg.slice(2);
|
|
21
22
|
const nextArg = args[i + 1];
|
|
22
23
|
if (!nextArg || nextArg.startsWith("--")) {
|
|
23
|
-
flags[
|
|
24
|
+
flags[key] = true;
|
|
24
25
|
} else {
|
|
25
|
-
flags[
|
|
26
|
+
flags[key] = nextArg;
|
|
26
27
|
i++;
|
|
27
28
|
}
|
|
28
29
|
}
|
package/bin/dev.mjs
CHANGED
|
@@ -14,14 +14,15 @@ function parseFlags() {
|
|
|
14
14
|
const arg = args[i];
|
|
15
15
|
if (arg.startsWith("--")) {
|
|
16
16
|
if (arg.includes("=")) {
|
|
17
|
-
const [key, value] = arg.split("=", 2);
|
|
17
|
+
const [key, value] = arg.slice(2).split("=", 2);
|
|
18
18
|
flags[key] = value;
|
|
19
19
|
} else {
|
|
20
|
+
const key = arg.slice(2);
|
|
20
21
|
const nextArg = args[i + 1];
|
|
21
22
|
if (!nextArg || nextArg.startsWith("--")) {
|
|
22
|
-
flags[
|
|
23
|
+
flags[key] = true;
|
|
23
24
|
} else {
|
|
24
|
-
flags[
|
|
25
|
+
flags[key] = nextArg;
|
|
25
26
|
i++;
|
|
26
27
|
}
|
|
27
28
|
}
|
package/bin/init.mjs
CHANGED
|
@@ -32,7 +32,7 @@ async function input(prompt, placeholder = "") {
|
|
|
32
32
|
const chars = typeof buf === "string" ? buf : decoder.decode(buf);
|
|
33
33
|
switch (chars) {
|
|
34
34
|
case "":
|
|
35
|
-
stdout.write("\x1B[999C\n\x1B[
|
|
35
|
+
stdout.write("\x1B[999C\n\x1B[90mCancelled.\x1B[0m\n");
|
|
36
36
|
exit(130);
|
|
37
37
|
return;
|
|
38
38
|
case "\r":
|
|
@@ -97,7 +97,7 @@ async function confirm(prompt) {
|
|
|
97
97
|
const c = typeof buf === "string" ? buf.charCodeAt(0) : buf[0];
|
|
98
98
|
switch (c) {
|
|
99
99
|
case 3:
|
|
100
|
-
stdout.write("\x1B[999C\n\x1B[
|
|
100
|
+
stdout.write("\x1B[999C\n\x1B[90mCancelled.\x1B[0m\n");
|
|
101
101
|
exit(130);
|
|
102
102
|
break;
|
|
103
103
|
case 89:
|