create-lumiose 0.2.0 → 0.3.0
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/scaffold.js +2 -1
- package/package.json +4 -4
- package/templates/minimal/src/routes/{index.stsx → page.stsx} +2 -1
- package/templates/spa/src/routes/{about.stsx → about/page.stsx} +4 -1
- package/templates/ssr/src/routes/api/{entries.ts → entries/route.ts} +1 -1
- package/templates/ssr/src/routes/{guestbook.stsx → guestbook/page.stsx} +1 -1
- package/templates/static/src/routes/blog/{[slug].stsx → [slug]/page.stsx} +1 -1
- /package/templates/spa/src/routes/{_layout.stsx → layout.stsx} +0 -0
- /package/templates/spa/src/routes/{index.stsx → page.stsx} +0 -0
- /package/templates/ssr/src/routes/{_layout.stsx → layout.stsx} +0 -0
- /package/templates/ssr/src/routes/{_404.stsx → not-found.stsx} +0 -0
- /package/templates/ssr/src/routes/{index.stsx → page.stsx} +0 -0
- /package/templates/static/src/routes/{about.stsx → about/page.stsx} +0 -0
- /package/templates/static/src/routes/{_layout.stsx → layout.stsx} +0 -0
- /package/templates/static/src/routes/{_404.stsx → not-found.stsx} +0 -0
- /package/templates/static/src/routes/{index.stsx → page.stsx} +0 -0
package/dist/scaffold.js
CHANGED
|
@@ -151,7 +151,8 @@ ${template.description}. Made with Lumiose (\`create-lumiose --template ${templa
|
|
|
151
151
|
|
|
152
152
|
## Layout
|
|
153
153
|
|
|
154
|
-
- \`src/routes/\`:
|
|
154
|
+
- \`src/routes/\`: one folder per URL segment, with a \`page.stsx\` page or a \`route.ts\` endpoint;
|
|
155
|
+
\`layout.stsx\` wraps the pages below it. Other files there are colocated modules.
|
|
155
156
|
- \`vite.config.ts\`: \`lumiose({ mode: "${template.mode}" })\` sets the default route mode.
|
|
156
157
|
- \`.lumiose/\`: generated types and shadow files (git-ignored).
|
|
157
158
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-lumiose",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Create a Lumiose app: `pnpm create lumiose my-app --template ssr`. Every project starts agent-ready (AGENTS.md, CLAUDE.md, the lumiose skill).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
],
|
|
18
18
|
"type": "module",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@lumiose/cli": "0.
|
|
21
|
-
"lumiose": "0.
|
|
20
|
+
"@lumiose/cli": "0.3.0",
|
|
21
|
+
"lumiose": "0.3.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@lumiose/adapter-node": "0.
|
|
24
|
+
"@lumiose/adapter-node": "0.3.0",
|
|
25
25
|
"typescript": "^7.0.2",
|
|
26
26
|
"vite": "^8.3.4"
|
|
27
27
|
},
|
|
@@ -6,7 +6,8 @@ export default function Home() {
|
|
|
6
6
|
<Title>{{name}}</Title>
|
|
7
7
|
<h1>{{name}}</h1>
|
|
8
8
|
<p>
|
|
9
|
-
Edit <code>src/routes/
|
|
9
|
+
Edit <code>src/routes/page.stsx</code>: each folder in <code>src/routes</code> with a{" "}
|
|
10
|
+
<code>page.stsx</code> is a page.
|
|
10
11
|
</p>
|
|
11
12
|
</main>
|
|
12
13
|
);
|
|
@@ -5,7 +5,10 @@ export default function About() {
|
|
|
5
5
|
<main>
|
|
6
6
|
<Title>About · {{name}}</Title>
|
|
7
7
|
<h1>About</h1>
|
|
8
|
-
<p>
|
|
8
|
+
<p>
|
|
9
|
+
Pages are page.stsx files in src/routes folders; the layout in src/routes/layout.stsx wraps
|
|
10
|
+
them.
|
|
11
|
+
</p>
|
|
9
12
|
</main>
|
|
10
13
|
);
|
|
11
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// GET /api/entries: the guestbook as JSON.
|
|
2
2
|
import type { Endpoint } from "lumiose";
|
|
3
|
-
import { listEntries } from "
|
|
3
|
+
import { listEntries } from "../../../server/guestbook.server.ts";
|
|
4
4
|
|
|
5
5
|
export const GET: Endpoint<"/api/entries"> = () => Response.json(listEntries());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// A form that works without JavaScript: it posts to the `sign` action, which validates the input
|
|
2
2
|
// and redirects back (or returns the errors, which the page reads with actionData()).
|
|
3
3
|
import { actionData, fail, redirect, Title, type ActionContext } from "lumiose";
|
|
4
|
-
import { addEntry, listEntries } from "
|
|
4
|
+
import { addEntry, listEntries } from "../../server/guestbook.server.ts";
|
|
5
5
|
|
|
6
6
|
interface Errors {
|
|
7
7
|
name?: string;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|