create-lumiose 0.2.0 → 0.4.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/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # create-lumiose
2
+
3
+ Creates a [Lumiose](https://itsjavi.com/lumiose/) app.
4
+
5
+ ```sh
6
+ npm create lumiose@latest my-app
7
+ pnpm create lumiose my-app --template ssr
8
+ ```
9
+
10
+ | Template | What you get |
11
+ | --------- | ----------------------------------------------------------- |
12
+ | `minimal` | One page |
13
+ | `static` | A layout, pages, a blog with `staticPaths()` and a 404 page |
14
+ | `ssr` | Streaming, a form action, a JSON endpoint and a Node server |
15
+ | `spa` | Pages and a persistent layout rendered in the browser |
16
+
17
+ Every project starts agent-ready: `AGENTS.md`, `CLAUDE.md` and the `lumiose` skill. `--mcp` also
18
+ registers the Lumiose MCP server for Claude Code and Codex. `create-lumiose --help` lists every
19
+ option (`--yes`, `--force`, `--mcp`, `--format json`).
20
+
21
+ Next: [Getting started](https://itsjavi.com/lumiose/docs/getting-started/).
22
+
23
+ ## License
24
+
25
+ [MIT](https://github.com/itsjavi/lumiose/blob/main/LICENSE)
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/\`: pages (\`.stsx\`) and endpoints (\`.ts\`); the file path is the URL.
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.2.0",
3
+ "version": "0.4.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.2.0",
21
- "lumiose": "0.2.0"
20
+ "@lumiose/cli": "0.4.0",
21
+ "lumiose": "0.4.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@lumiose/adapter-node": "0.2.0",
24
+ "@lumiose/adapter-node": "0.4.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/index.stsx</code>: pages are files in <code>src/routes</code>.
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>Pages are files in src/routes; the layout in src/routes/_layout.stsx wraps them.</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 "../../server/guestbook.server.ts";
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 "../server/guestbook.server.ts";
4
+ import { addEntry, listEntries } from "../../server/guestbook.server.ts";
5
5
 
6
6
  interface Errors {
7
7
  name?: string;
@@ -1,5 +1,5 @@
1
1
  import { notFound, params, Title } from "lumiose";
2
- import { findPost, posts } from "../../lib/posts.ts";
2
+ import { findPost, posts } from "../../../lib/posts.ts";
3
3
 
4
4
  /** The paths `lumiose build` prerenders for this route. */
5
5
  export async function staticPaths() {