Commit bbc4d4d
committed
cli: --dev/--prod presets, --help, subcommand
Three coordinated changes.
1. --dev / --prod presets on generate/serve/watch:
--dev local-friendly (no minify, no base-path).
--prod GH Pages-shaped (--minify + --base-path=/socket-packageurl-js).
No preset → auto-pick via `'CI' in process.env`:
CI set (GitHub Actions etc.) → prod.
CI unset (local) → dev.
Explicit --minify / --base-path= still work and override piecewise.
This removes duplicate flag strings from package.json scripts and CI
workflows; the CLI + env are the single source of truth.
2. Rename deploy-val → valtown:
- Subcommand: `pnpm walkthrough valtown`
- Function: deployVal → deployValtown
- Workflow: .github/workflows/deploy-val.yml → valtown.yml
- npm script: walkthrough:val → walkthrough:valtown
Matches the bare-word subcommand convention (generate, serve, watch,
token, doctor) rather than the hyphenated verb.
3. --help / -h:
`pnpm walkthrough --help` (and -h, and bare walkthrough) prints
usage to stdout with exit 0. Unknown subcommands still go to stderr
with exit 1 and a pointer to --help, rather than dumping the whole
usage block.
package.json scripts collapse — the old `walkthrough:build:prod` went
away; `walkthrough:build` relies on the CLI to pick the right mode
based on the `CI` env var.
pages.yml + valtown.yml updated to match the new names; pages now
just runs `pnpm walkthrough:build` (CI env auto-selects --prod).valtown (renamed)1 parent bfce1e3 commit bbc4d4d
4 files changed
Lines changed: 95 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 71 | + | |
| 72 | + | |
77 | 73 | | |
78 | 74 | | |
79 | 75 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
| 68 | + | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1008 | 1008 | | |
1009 | 1009 | | |
1010 | 1010 | | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1011 | 1020 | | |
1012 | 1021 | | |
1013 | 1022 | | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1019 | 1028 | | |
1020 | | - | |
| 1029 | + | |
1021 | 1030 | | |
1022 | | - | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1023 | 1053 | | |
1024 | | - | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
1025 | 1060 | | |
1026 | 1061 | | |
1027 | 1062 | | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1028 | 1087 | | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1029 | 1096 | | |
1030 | 1097 | | |
1031 | 1098 | | |
| |||
1037 | 1104 | | |
1038 | 1105 | | |
1039 | 1106 | | |
1040 | | - | |
1041 | | - | |
| 1107 | + | |
| 1108 | + | |
1042 | 1109 | | |
1043 | 1110 | | |
1044 | 1111 | | |
| |||
1047 | 1114 | | |
1048 | 1115 | | |
1049 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
1050 | 1119 | | |
1051 | | - | |
1052 | | - | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
| 1120 | + | |
1058 | 1121 | | |
1059 | 1122 | | |
1060 | 1123 | | |
| |||
1119 | 1182 | | |
1120 | 1183 | | |
1121 | 1184 | | |
1122 | | - | |
| 1185 | + | |
1123 | 1186 | | |
1124 | 1187 | | |
1125 | 1188 | | |
1126 | 1189 | | |
1127 | 1190 | | |
1128 | 1191 | | |
1129 | | - | |
| 1192 | + | |
1130 | 1193 | | |
1131 | 1194 | | |
1132 | 1195 | | |
| |||
0 commit comments