create-kudzu 0.1.46 → 0.1.47
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/README.md +2 -0
- package/index.mjs +20 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,4 +8,6 @@ cd my-app
|
|
|
8
8
|
npm run dev
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
The generated project includes page metadata, automatic source CSS, and `npm run check`. Configuration remains optional until the app needs custom assets, document defaults, navigation, or build hooks.
|
|
12
|
+
|
|
11
13
|
Use `--no-install` to create the files without installing dependencies.
|
package/index.mjs
CHANGED
|
@@ -26,10 +26,11 @@ const files = {
|
|
|
26
26
|
type: "module",
|
|
27
27
|
scripts: {
|
|
28
28
|
dev: "kudzu dev",
|
|
29
|
-
build: "kudzu build"
|
|
29
|
+
build: "kudzu build",
|
|
30
|
+
check: "tsc --noEmit && kudzu build"
|
|
30
31
|
},
|
|
31
32
|
dependencies: {
|
|
32
|
-
"@kudzujs/core": "^0.6.
|
|
33
|
+
"@kudzujs/core": "^0.6.22"
|
|
33
34
|
}
|
|
34
35
|
}, null, 2)}\n`,
|
|
35
36
|
"tsconfig.json": `${JSON.stringify({
|
|
@@ -45,6 +46,11 @@ const files = {
|
|
|
45
46
|
".gitignore": "node_modules/\ndist/\n.kudzu/\n",
|
|
46
47
|
"src/pages/index.tsx": `import { useState } from "@kudzujs/core"
|
|
47
48
|
|
|
49
|
+
export const metadata = {
|
|
50
|
+
title: "${name}",
|
|
51
|
+
description: "Built with Kudzu"
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
export default function HomePage() {
|
|
49
55
|
const [count, setCount] = useState(0)
|
|
50
56
|
|
|
@@ -68,6 +74,18 @@ main { display: grid; min-height: 100vh; place-content: center; text-align: cent
|
|
|
68
74
|
p { color: #cfa8ff; }
|
|
69
75
|
h1 { font-size: clamp(3rem, 10vw, 7rem); margin: 0 0 2rem; }
|
|
70
76
|
button { padding: .8rem 1.2rem; color: white; background: #8d52ff; border: 0; border-radius: .5rem; cursor: pointer; }
|
|
77
|
+
`,
|
|
78
|
+
"README.md": `# ${name}
|
|
79
|
+
|
|
80
|
+
\`src/pages/index.tsx\` maps to \`/\`. Add TSX files under \`src/pages\` for more routes; CSS under \`src\` is emitted and linked automatically.
|
|
81
|
+
|
|
82
|
+
\`kudzu.config.mjs\` is optional. Add it only when the project needs a base path, external public directory, transformed source styles, global metadata, navigation groups, or post-build artifacts.
|
|
83
|
+
|
|
84
|
+
\`\`\`bash
|
|
85
|
+
npm run dev
|
|
86
|
+
npm run check
|
|
87
|
+
npm run build
|
|
88
|
+
\`\`\`
|
|
71
89
|
`
|
|
72
90
|
}
|
|
73
91
|
|