create-stewie
v0.2.0
Published
Project scaffolding CLI for the Stewie framework
Downloads
98
Maintainers
Readme
create-stewie
❗ Work in progress.
Stewie is under active development and not yet stable. APIs may change between releases. Not recommended for production use yet.
Project scaffolding CLI for Stewie. Generates a fully configured starter project with one command.
Part of the Stewie framework.
Usage
pnpm create stewie my-app
cd my-app
pnpm install
pnpm devThe CLI prompts for:
- Project name
- Mode —
static(client-only, fetches from external APIs) orssr(server-rendered) - SSR runtime (if SSR mode) —
nodeorbun - Include router — adds
@stewie-js/routerand example routes
What gets generated
All modes include:
package.jsonwith the correct@stewie-js/*dependenciesvite.config.tswith the@stewie-js/viteplugintsconfig.jsontargeting ES2022src/App.tsx— root component with a working exampleindex.html— HTML shell
SSR mode also includes:
src/server.ts— server entry using the appropriate adaptersrc/client.tsx— client hydration entryvite.config.ts— configured with SSR build environmentsstartscript for running the production server
Programmatic API
import { scaffoldProject, generateFiles } from 'create-stewie'
const files = generateFiles({
projectName: 'my-app',
mode: 'ssr',
ssrRuntime: 'node',
includeRouter: true,
})
await scaffoldProject('./my-app', files)