create-astroid 0.3.2 → 0.3.4
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.mjs +13 -5
- package/package.json +4 -4
package/index.mjs
CHANGED
|
@@ -74,7 +74,12 @@ function parseArgs(argv) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
const slugify = (s) =>
|
|
77
|
-
s
|
|
77
|
+
s
|
|
78
|
+
.trim()
|
|
79
|
+
.toLowerCase()
|
|
80
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
81
|
+
.replace(/^-+|-+$/g, "")
|
|
82
|
+
.slice(0, 40);
|
|
78
83
|
|
|
79
84
|
// --- toolkit versions ------------------------------------------------------
|
|
80
85
|
|
|
@@ -258,17 +263,20 @@ async function main() {
|
|
|
258
263
|
const dirArg = positionals[0] ?? flags.dir;
|
|
259
264
|
const rawName = flags.name || (dirArg ? basename(resolve(dirArg)) : undefined);
|
|
260
265
|
const name = await prompt("Brand / site name", rawName || "My Astroid Site");
|
|
261
|
-
const key = slugify(
|
|
266
|
+
const key = slugify(
|
|
267
|
+
flags.key || (await prompt("Project key (slug)", slugify(name) || "my-site")),
|
|
268
|
+
);
|
|
262
269
|
const dir = resolve(dirArg || (await prompt("Directory", key)) || key);
|
|
263
|
-
const archetypeRaw = (
|
|
270
|
+
const archetypeRaw = (
|
|
271
|
+
flags.archetype || (await prompt(`Archetype (${ARCHETYPES.join("/")})`, "marketing"))
|
|
272
|
+
).toLowerCase();
|
|
264
273
|
const archetype = ARCHETYPES.includes(archetypeRaw) ? archetypeRaw : "marketing";
|
|
265
274
|
const color = flags.color || (await prompt("Brand color (hex)", "#5b4bff"));
|
|
266
275
|
const host = flags.host && flags.host !== true ? flags.host : undefined;
|
|
267
276
|
// The customer PORTAL is opt-in via --portal, but a storefront IMPLIES one — a
|
|
268
277
|
// shop has customers who sign in, reorder, and track orders — so enable it there
|
|
269
278
|
// by default. (Commerce below stays opt-in: infra a marketing site shouldn't carry.)
|
|
270
|
-
const portal =
|
|
271
|
-
flags.portal === true || flags.portal === "true" || archetype === "storefront";
|
|
279
|
+
const portal = flags.portal === true || flags.portal === "true" || archetype === "storefront";
|
|
272
280
|
// The map module is opt-in and pulls real weight (maplibre-gl is ~1 MB), so
|
|
273
281
|
// it is never on by default.
|
|
274
282
|
const map = flags.map === true || flags.map === "true";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-astroid",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Scaffold a new Astroid site — an editable, multi-editor Astro app on Cloudflare Workers — in one command.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"url": "git+https://github.com/bowenlabs/louise-toolkit.git",
|
|
19
19
|
"directory": "packages/create-astroid"
|
|
20
20
|
},
|
|
21
|
-
"type": "module",
|
|
22
21
|
"bin": {
|
|
23
22
|
"create-astroid": "./index.mjs"
|
|
24
23
|
},
|
|
@@ -26,14 +25,15 @@
|
|
|
26
25
|
"index.mjs",
|
|
27
26
|
"template"
|
|
28
27
|
],
|
|
28
|
+
"type": "module",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.6.23",
|
|
34
34
|
"better-auth": "^1.6.23",
|
|
35
|
-
"louise-toolkit": "0.
|
|
36
|
-
"astroidjs": "0.
|
|
35
|
+
"louise-toolkit": "0.20.0",
|
|
36
|
+
"astroidjs": "0.4.1"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=24.0.0"
|