create-ezhana-app
v3.1.1
Published
Scaffold Next.js, Vue, Astro, Nuxt or SvelteKit apps inside an Ezhana frontend-template workspace.
Maintainers
Readme
create-ezhana-app
Scaffolds a Next.js, Vue, Astro, Nuxt or SvelteKit app inside an Ezhana frontend-template
workspace. The tool is a dispatcher over the official scaffolders; the framework-to-CLI mapping and
the default flags live in lib/registry.mjs.
pnpm install
pnpm create:app # choose a framework, then run the official CLI interactively
pnpm create:app next my-app # official CLI interactive, framework preselected
pnpm create:app next my-app --defaults # registry defaults, no prompts
pnpm create:app vue my-app --defaults --eslint --prettier
pnpm create:app next my-app --defaults --theme oceanApps are created under apps/<name> and become part of the pnpm workspace. Run create from the
workspace root; --target <path> generates somewhere else.
Interactive and non-interactive modes
Without --defaults, the official scaffolder owns its prompts. The wrapper only asks for a missing
framework and app name. Passing the framework positionally (or with --framework) skips the
wrapper's framework prompt; the official CLI still prompts for its own options.
--defaults runs the same CLI with the defaultFlags from the registry, so the command is suitable
for CI. Non-interactive environments without --defaults fail with a clear error.
Registry
Each entry in lib/registry.mjs defines:
| Field | Meaning |
| ------------------ | ------------------------------------------------------------- |
| package | published scaffolder package, e.g. create-next-app@latest |
| args | argument builder that inserts the project directory and flags |
| interactiveFlags | flags used when the official CLI should prompt |
| defaultFlags | flags used by --defaults |
| eslintConfig | published ESLint config package used by --eslint |
| prettierPlugins | extra Prettier plugins added by --prettier |
To add a framework, add one registry entry and (if needed) a shared ESLint config package.
Lint and format
--eslint writes eslint.config.mjs at the app root and adds the framework-mapped config package
from npm (^<version> from versions.json) plus eslint and typescript at the catalog versions.
--prettier writes prettier.config.mjs and .prettierignore at the app root and adds
@ezhana/prettier-config from npm, prettier, and any registry prettierPlugins (for example
prettier-plugin-astro and prettier-plugin-svelte).
Registry plugins are imported as modules in the generated config
(import * as astro from 'prettier-plugin-astro', listed as a value in plugins). Listing the
package name instead makes Prettier resolve it against its process cwd, which is the workspace root
when the root format script or the lint-staged hook runs; the plugin is only installed in the app,
so the name lookup fails. Module imports resolve from the app config file instead.
The written files contain no rules: the rules live in the published @ezhana/eslint-config-* and
@ezhana/prettier-config packages. The generator adds them as regular devDependencies at the
versions recorded in versions.json, so --eslint / --prettier work for any target, including
--target outside a pnpm workspace. Values in versions.json must exist on npm before installing
them; the generated template's CI exercises the full install path after a release.
The flags are creation-only: the tool does not reconfigure an existing app. It overwrites the config files it owns during creation and does not delete or rewrite scaffold configuration, scripts or dependencies.
Theme CSS
--theme <name> is a minimal CSS-only integration:
- a bare id such as
oceanmaps to@ezhana/design-theme-ocean; - a full package spec such as
@acme/design-themeis used as-is; - the tool searches a fixed list of global CSS paths (preferring
src/styles/global.css), prepends@import '<package>/style.css';, and adds the theme package to the app; - if no global CSS file is found, the theme is skipped with a warning and nothing is installed.
There is no runtime, switcher, anti-flash script or framework-specific overlay.
Options
| Option | Effect |
| -------------------- | ----------------------------------------------------------------------- |
| --framework <name> | framework name (alternative to the first positional argument) |
| --name <name> | app directory name (alternative to the second positional argument) |
| --target <path> | explicit output path instead of apps/<name> |
| --root <path> | workspace root used for the default apps/<name> path |
| --defaults | run the official scaffolder with the registry default flags |
| --eslint | write eslint.config.mjs and add the framework's shared ESLint package |
| --prettier | write prettier.config.mjs / .prettierignore and add Prettier |
| --theme <name> | inject a theme CSS import into the app's global CSS |
| --no-install | scaffold and write files only; print the install commands |
| --no-verify | add dependencies but skip lint/build verification |
| --keep-temp | keep the staging directory when generation fails |
| --list | list available frameworks |
Requires Node.js 24 and pnpm 12, and network access for the first run (the official scaffolders and dependencies are downloaded).
