Skip to main content
Scaffold an admin frontend module from the upstream skeleton. The command writes modules/<name>/, renames modules/<name>/admin.yml to modules/<name>/<name>.yml, rewrites modules/<name>/package.json, rewrites imports under modules/<name>/src/, updates modules/<name>/vite.config.ts, creates modules/<name>/src/shared/.gitkeep, and adds a root tsconfig.json path alias when that file exists.

Usage

Examples

Run with no flags to be prompted for the admin name, design module, and target module when choices exist:
Create an admin non-interactively:
Create an admin without a target module:

Options

Generated module

The copied module is marked type: "admin" in modules/<name>/<name>.yml. When a design is chosen, the yml receives design: "<design>"; when a target is chosen, it receives target: "<target>".

Rewrites

The package is renamed to @module/<name>, its Vite scripts are written with a free port starting at 3030, imports from @module/admin are rewritten to @module/<name>, and the Vite config is updated with the selected design alias.