create-selrux
v0.0.14
Published
Scaffold a Selrux convention-based React app (minimal or full shell)
Maintainers
Readme
create-selrux
用模板创建 Selrux / @vlian/app 约定式 React 应用,用法对齐 pnpm create umi --template …。
用法
pnpm create selrux@latest my-app --template minimal
pnpm create selrux@latest my-app --template shell| 模板 | 依赖 | Registry |
| --- | --- | --- |
| minimal | @vlian/app + peers | 仅公网 |
| shell | 只额外声明 @selrux/shell;默认写私服 http://www.lixw.site:18081/repository/npm-hosted/,可用 --registry 覆盖 | Nexus |
请先确保 @vlian/app 已发布到 npmjs。shell 模板还需本机对 Nexus 有认证。
模板
| ID | 说明 |
| --- | --- |
| minimal(别名 basic / simple) | 精简页:仅首页,精简默认布局 |
| shell(别名 full / admin) | 完整壳:shell: true + 布局示例 |
常用选项
-t, --template <id> 模板
--pm <pnpm|npm|yarn> 包管理器(默认 pnpm)
--name <pkg> package.json name
--selrux-version <ver> @vlian/app 与 @selrux/* 版本(默认 app 0.0.13 / shell 0.0.8)
--registry <url> shell 私服(默认 http://www.lixw.site:18081/repository/npm-hosted/)
--workspace 依赖使用 workspace:*(本 monorepo 内联调)
--no-install 只生成文件
--force 允许写入非空目录发布脚手架后如何测
pnpm create selrux@latest /tmp/demo-minimal --template minimal --no-install
pnpm create selrux@latest /tmp/demo-shell --template shell --no-install本地调试
node packages/create-selrux/bin/create-selrux.mjs /tmp/demo --template minimal --no-install
pnpm --filter create-selrux test发版顺序见 publish-shell-nexus.md:shell → @vlian/app → create-selrux。
