create-fluixi
v0.1.0-alpha.15
Published
Scaffold a new Fluixi app — `npm create fluixi <dir>`.
Readme
create-fluixi
Scaffold a new Fluixi app — npm create fluixi <dir>.
✨ Overview
Run via your package manager's create shortcut — no install needed:
npm create fluixi my-app
# or
pnpm create fluixi my-app
# or
yarn create fluixi my-appIt prompts for a project name, a mode and an authoring format, or takes them on the command line:
create-fluixi my-app --ssr # SSR app (@fluixi/start: file routing + SSR + hydration)
create-fluixi my-app --spa # SPA (vite + @fluixi/vite-plugin)
create-fluixi my-app --spa --html # same app, html`` templates instead of JSX--jsx (default) or --html picks how you write components. The html`` variant is
JSX-free — plain .ts files, no jsxImportSource, and @fluixi/ts-plugin
wired up so the editor still understands the templates. Both compile to the same thing.
Then:
cd my-app
pnpm install
pnpm dev🗂️ Templates
| Mode | Stack | Entry |
| --- | --- | --- |
| SSR | @fluixi/start + @fluixi/cli | src/entry-{server,client}, src/routes/, fluixi.config.ts |
| SPA | vite + @fluixi/vite-plugin | src/main.tsx → render(() => <App/>) |
Each comes in a JSX and an html`` variant (template-ssr, template-ssr-html, and the same
two for SPA).
Both pin @fluixi/* to the next dist-tag and set jsxImportSource: "@fluixi/jsx".
🧱 Scaffolding pieces
To add components, routes, or middleware inside an existing app, use fluixi generate
from @fluixi/cli:
fluixi g component Button
fluixi g route about