create-fluixi 0.1.0-alpha.9 → 1.0.0-alpha.101
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/LICENSE +1 -1
- package/README.md +10 -6
- package/dist/index.js +887 -140
- package/package.json +19 -2
- package/template-spa/README.md +16 -0
- package/template-spa/_gitignore +1 -0
- package/template-spa/fluixi.config.ts +18 -0
- package/template-spa/index.html +3 -3
- package/template-spa/package.json +15 -7
- package/template-spa/src/app.tsx +30 -7
- package/template-spa/src/entry-client.tsx +8 -0
- package/template-spa/src/entry-server.ts +22 -0
- package/template-spa/src/routes/about.tsx +8 -0
- package/template-spa/src/routes/index.tsx +24 -0
- package/template-spa/tsconfig.json +2 -2
- package/template-spa-html/README.md +19 -0
- package/template-spa-html/_gitignore +1 -0
- package/template-spa-html/fluixi.config.ts +18 -0
- package/template-spa-html/index.html +3 -3
- package/template-spa-html/package.json +15 -6
- package/template-spa-html/src/app.ts +28 -7
- package/template-spa-html/src/entry-client.ts +8 -0
- package/template-spa-html/src/entry-server.ts +22 -0
- package/template-spa-html/src/routes/about.ts +10 -0
- package/template-spa-html/src/routes/index.ts +24 -0
- package/template-spa-html/tsconfig.json +2 -2
- package/template-ssr/_gitignore +1 -0
- package/template-ssr/fluixi.config.ts +3 -3
- package/template-ssr/package.json +9 -4
- package/template-ssr/src/app.tsx +5 -5
- package/template-ssr/src/entry-client.tsx +2 -2
- package/template-ssr/src/entry-server.ts +7 -2
- package/template-ssr/src/routes/index.tsx +2 -3
- package/template-ssr-html/_gitignore +1 -0
- package/template-ssr-html/fluixi.config.ts +3 -3
- package/template-ssr-html/package.json +10 -4
- package/template-ssr-html/src/app.ts +4 -4
- package/template-ssr-html/src/entry-client.ts +2 -2
- package/template-ssr-html/src/entry-server.ts +7 -2
- package/template-ssr-html/src/routes/index.ts +2 -3
- package/template-spa/src/main.tsx +0 -5
- package/template-spa/vite.config.ts +0 -13
- package/template-spa-html/src/main.ts +0 -5
- package/template-spa-html/vite.config.ts +0 -13
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# create-fluixi
|
|
6
6
|
|
|
7
|
-
**Scaffold a new Fluixi app
|
|
7
|
+
**Scaffold a new Fluixi app: `npm create fluixi <dir>`.**
|
|
8
8
|
|
|
9
9
|
[](./LICENSE)
|
|
10
10
|

|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
## ✨ Overview
|
|
16
16
|
|
|
17
|
-
Run via your package manager's `create` shortcut
|
|
17
|
+
Run via your package manager's `create` shortcut: no install needed:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm create fluixi my-app
|
|
@@ -24,18 +24,21 @@ pnpm create fluixi my-app
|
|
|
24
24
|
yarn create fluixi my-app
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
npm keeps options for itself unless they follow `--`: `npm create fluixi@alpha -- my-app --spa`,
|
|
28
|
+
or `npm create fluixi@alpha -- --help` for the list. pnpm and Yarn pass them through.
|
|
29
|
+
|
|
27
30
|
It prompts for a project name, a **mode** and an **authoring format**, or takes them on the
|
|
28
31
|
command line:
|
|
29
32
|
|
|
30
33
|
```bash
|
|
31
34
|
create-fluixi my-app --ssr # SSR app (@fluixi/start: file routing + SSR + hydration)
|
|
32
|
-
create-fluixi my-app --spa # SPA (
|
|
35
|
+
create-fluixi my-app --spa # SPA (@fluixi/start with ssr: false, rendered in the browser)
|
|
33
36
|
|
|
34
37
|
create-fluixi my-app --spa --html # same app, html`` templates instead of JSX
|
|
35
38
|
```
|
|
36
39
|
|
|
37
40
|
`--jsx` (default) or `--html` picks how you write components. The html`` variant is
|
|
38
|
-
JSX-free
|
|
41
|
+
JSX-free: plain `.ts` files, no `jsxImportSource`, and [`@fluixi/ts-plugin`](../ts-plugin)
|
|
39
42
|
wired up so the editor still understands the templates. Both compile to the same thing.
|
|
40
43
|
|
|
41
44
|
Then:
|
|
@@ -51,12 +54,13 @@ pnpm dev
|
|
|
51
54
|
| Mode | Stack | Entry |
|
|
52
55
|
| --- | --- | --- |
|
|
53
56
|
| **SSR** | [`@fluixi/start`](../start) + [`@fluixi/cli`](../cli) | `src/entry-{server,client}`, `src/routes/`, `fluixi.config.ts` |
|
|
54
|
-
| **SPA** | `
|
|
57
|
+
| **SPA** | [`@fluixi/start`](../start) + [`@fluixi/cli`](../cli), `ssr: false` | `src/entry-{server,client}`, `src/routes/`, `fluixi.config.ts` |
|
|
55
58
|
|
|
56
59
|
Each comes in a JSX and an html`` variant (`template-ssr`, `template-ssr-html`, and the same
|
|
57
60
|
two for SPA).
|
|
58
61
|
|
|
59
|
-
Both
|
|
62
|
+
Both list `@fluixi/start` and every runtime package it shares with the app, on the `alpha`
|
|
63
|
+
dist-tag, and set `jsxImportSource: "@fluixi/jsx"`.
|
|
60
64
|
|
|
61
65
|
## 🧱 Scaffolding pieces
|
|
62
66
|
|