@oinone/cli 7.2.5 → 7.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -71
- package/README_zh-CN.md +100 -71
- package/bin/cli.js +48 -473
- package/bin/commands/cache.js +70 -0
- package/bin/commands/create/enterprise.js +81 -0
- package/bin/commands/create/index.js +128 -0
- package/bin/commands/create/project.js +81 -0
- package/bin/commands/create/prompts.js +126 -0
- package/bin/commands/create/static-resources.js +159 -0
- package/bin/commands/create/template.js +38 -0
- package/bin/commands/create/update-check.js +44 -0
- package/bin/commands/create/version-source.js +32 -0
- package/bin/commands/create.js +1 -0
- package/bin/commands/doctor.js +51 -0
- package/bin/config.js +54 -0
- package/bin/i18n.js +51 -125
- package/bin/locales/en-US.json +81 -0
- package/bin/locales/zh-CN.json +81 -0
- package/bin/utils/oinone-version.js +60 -0
- package/package.json +2 -2
- package/template-6.4.0/packages/ss-boot/public/favicon.ico +0 -0
- package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/src/main.ts +1 -2
- package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/vue.config.js +1 -1
- package/{template-7.2.0-community → template-7.2.0}/npmrc +2 -0
- package/{template-7.2.0-community → template-7.2.0}/packages/ss-admin-widget/package.json +3 -2
- package/{template-7.2.0-community → template-7.2.0}/packages/ss-admin-widget/rollup.config.js +2 -0
- package/template-7.2.0/packages/ss-boot/public/favicon.ico +0 -0
- package/{template-7.2.0-community → template-7.2.0}/packages/ss-boot/src/main.ts +1 -2
- package/{template-7.2.0-community → template-7.2.0}/packages/ss-boot/vue.config.js +1 -1
- package/{template-7.2.0-enterprise → template-7.2.0}/packages/ss-oinone/package.json +3 -2
- package/{template-7.2.0-enterprise → template-7.2.0}/packages/ss-oinone/rollup.config.js +2 -0
- package/{template-7.2.0-community → template-7.2.0}/packages/ss-project/package.json +3 -2
- package/{template-7.2.0-enterprise → template-7.2.0}/packages/ss-project/rollup.config.js +2 -0
- package/template-6.4.0-community/packages/ss-boot/public/favicon.ico +0 -0
- package/template-6.4.0-enterprise/.eslintignore +0 -5
- package/template-6.4.0-enterprise/.eslintrc.json +0 -72
- package/template-6.4.0-enterprise/_package.json +0 -47
- package/template-6.4.0-enterprise/npmrc +0 -3
- package/template-6.4.0-enterprise/packages/ss-admin-widget/package.json +0 -25
- package/template-6.4.0-enterprise/packages/ss-admin-widget/rollup.config.js +0 -73
- package/template-6.4.0-enterprise/packages/ss-admin-widget/tsconfig.json +0 -45
- package/template-6.4.0-enterprise/packages/ss-boot/package.json +0 -66
- package/template-6.4.0-enterprise/packages/ss-boot/public/favicon.ico +0 -0
- package/template-6.4.0-enterprise/packages/ss-boot/src/main.ts +0 -69
- package/template-6.4.0-enterprise/packages/ss-boot/tsconfig.json +0 -44
- package/template-6.4.0-enterprise/packages/ss-boot/vue.config.js +0 -84
- package/template-6.4.0-enterprise/packages/ss-oinone/package.json +0 -29
- package/template-6.4.0-enterprise/packages/ss-oinone/rollup.config.js +0 -82
- package/template-6.4.0-enterprise/packages/ss-oinone/tsconfig.json +0 -42
- package/template-6.4.0-enterprise/packages/ss-project/package.json +0 -30
- package/template-6.4.0-enterprise/packages/ss-project/rollup.config.js +0 -83
- package/template-6.4.0-enterprise/packages/ss-project/tsconfig.json +0 -42
- package/template-6.4.0-enterprise/scripts/build/postbuild.js +0 -42
- package/template-6.4.0-enterprise/scripts/build/prebuild-only.js +0 -48
- package/template-7.2.0-community/.prettierrc.json +0 -8
- package/template-7.2.0-community/README.md +0 -59
- package/template-7.2.0-community/gitignore +0 -58
- package/template-7.2.0-community/lerna.json +0 -12
- package/template-7.2.0-community/packages/ss-admin-widget/index.ts +0 -1
- package/template-7.2.0-community/packages/ss-admin-widget/scripts/postpublish.js +0 -13
- package/template-7.2.0-community/packages/ss-admin-widget/scripts/prepublish-only.js +0 -24
- package/template-7.2.0-community/packages/ss-admin-widget/src/index.ts +0 -1
- package/template-7.2.0-community/packages/ss-admin-widget/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-community/packages/ss-admin-widget/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-community/packages/ss-boot/.env +0 -1
- package/template-7.2.0-community/packages/ss-boot/.env.example +0 -6
- package/template-7.2.0-community/packages/ss-boot/public/favicon.ico +0 -0
- package/template-7.2.0-community/packages/ss-boot/public/index.html +0 -83
- package/template-7.2.0-community/packages/ss-boot/public/manifest.js +0 -5
- package/template-7.2.0-community/packages/ss-boot/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-community/packages/ss-boot/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-community/packages/ss-oinone/index.ts +0 -1
- package/template-7.2.0-community/packages/ss-oinone/package.json +0 -30
- package/template-7.2.0-community/packages/ss-oinone/rollup.config.js +0 -14
- package/template-7.2.0-community/packages/ss-oinone/scripts/postpublish.js +0 -13
- package/template-7.2.0-community/packages/ss-oinone/scripts/prepublish-only.js +0 -24
- package/template-7.2.0-community/packages/ss-oinone/src/index.ts +0 -1
- package/template-7.2.0-community/packages/ss-oinone/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-community/packages/ss-oinone/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-community/packages/ss-project/index.ts +0 -1
- package/template-7.2.0-community/packages/ss-project/rollup.config.js +0 -14
- package/template-7.2.0-community/packages/ss-project/scripts/postpublish.js +0 -13
- package/template-7.2.0-community/packages/ss-project/scripts/prepublish-only.js +0 -24
- package/template-7.2.0-community/packages/ss-project/src/index.ts +0 -1
- package/template-7.2.0-community/packages/ss-project/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-community/packages/ss-project/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-community/pnpm-workspace.yaml +0 -3
- package/template-7.2.0-community/scripts/build/inset-tsconfig.js +0 -68
- package/template-7.2.0-community/scripts/build/package-name.js +0 -25
- package/template-7.2.0-community/scripts/clean.mjs +0 -22
- package/template-7.2.0-enterprise/.prettierrc.json +0 -8
- package/template-7.2.0-enterprise/README.md +0 -59
- package/template-7.2.0-enterprise/_package.json +0 -57
- package/template-7.2.0-enterprise/eslint.config.ts +0 -23
- package/template-7.2.0-enterprise/gitignore +0 -58
- package/template-7.2.0-enterprise/lerna.json +0 -12
- package/template-7.2.0-enterprise/npmrc +0 -3
- package/template-7.2.0-enterprise/packages/ss-admin-widget/index.ts +0 -1
- package/template-7.2.0-enterprise/packages/ss-admin-widget/package.json +0 -27
- package/template-7.2.0-enterprise/packages/ss-admin-widget/rollup.config.js +0 -14
- package/template-7.2.0-enterprise/packages/ss-admin-widget/scripts/postpublish.js +0 -13
- package/template-7.2.0-enterprise/packages/ss-admin-widget/scripts/prepublish-only.js +0 -24
- package/template-7.2.0-enterprise/packages/ss-admin-widget/src/index.ts +0 -1
- package/template-7.2.0-enterprise/packages/ss-admin-widget/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-enterprise/packages/ss-admin-widget/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-enterprise/packages/ss-admin-widget/tsconfig.json +0 -14
- package/template-7.2.0-enterprise/packages/ss-boot/.env +0 -1
- package/template-7.2.0-enterprise/packages/ss-boot/.env.example +0 -6
- package/template-7.2.0-enterprise/packages/ss-boot/package.json +0 -64
- package/template-7.2.0-enterprise/packages/ss-boot/public/favicon.ico +0 -0
- package/template-7.2.0-enterprise/packages/ss-boot/public/index.html +0 -83
- package/template-7.2.0-enterprise/packages/ss-boot/public/manifest.js +0 -5
- package/template-7.2.0-enterprise/packages/ss-boot/src/main.ts +0 -66
- package/template-7.2.0-enterprise/packages/ss-boot/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-enterprise/packages/ss-boot/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-enterprise/packages/ss-boot/tsconfig.json +0 -27
- package/template-7.2.0-enterprise/packages/ss-boot/vue.config.js +0 -87
- package/template-7.2.0-enterprise/packages/ss-oinone/index.ts +0 -1
- package/template-7.2.0-enterprise/packages/ss-oinone/scripts/postpublish.js +0 -13
- package/template-7.2.0-enterprise/packages/ss-oinone/scripts/prepublish-only.js +0 -24
- package/template-7.2.0-enterprise/packages/ss-oinone/src/index.ts +0 -1
- package/template-7.2.0-enterprise/packages/ss-oinone/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-enterprise/packages/ss-oinone/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-enterprise/packages/ss-oinone/tsconfig.json +0 -14
- package/template-7.2.0-enterprise/packages/ss-project/index.ts +0 -1
- package/template-7.2.0-enterprise/packages/ss-project/package.json +0 -30
- package/template-7.2.0-enterprise/packages/ss-project/scripts/postpublish.js +0 -13
- package/template-7.2.0-enterprise/packages/ss-project/scripts/prepublish-only.js +0 -24
- package/template-7.2.0-enterprise/packages/ss-project/src/index.ts +0 -1
- package/template-7.2.0-enterprise/packages/ss-project/src/shim-translate.d.ts +0 -10
- package/template-7.2.0-enterprise/packages/ss-project/src/shim-vue.d.ts +0 -6
- package/template-7.2.0-enterprise/packages/ss-project/tsconfig.json +0 -14
- package/template-7.2.0-enterprise/pnpm-workspace.yaml +0 -3
- package/template-7.2.0-enterprise/scripts/build/inset-tsconfig.js +0 -68
- package/template-7.2.0-enterprise/scripts/build/package-name.js +0 -25
- package/template-7.2.0-enterprise/scripts/clean.mjs +0 -22
- /package/{template-6.4.0-community → template-6.4.0}/.eslintignore +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/.eslintrc.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/.prettierrc.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/README.md +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/_package.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/gitignore +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/lerna.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/npmrc +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/index.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/package.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/rollup.config.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/scripts/postpublish.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/scripts/prepublish-only.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/src/index.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/src/shim-vue.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-admin-widget/tsconfig.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/.env +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/.env.example +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/package.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/public/index.html +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/public/manifest.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/src/shim-vue.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-boot/tsconfig.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/index.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/package.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/rollup.config.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/scripts/postpublish.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/scripts/prepublish-only.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/src/index.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/src/shim-vue.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-oinone/tsconfig.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/index.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/package.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/rollup.config.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/scripts/postpublish.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/scripts/prepublish-only.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/src/index.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/src/shim-vue.d.ts +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/packages/ss-project/tsconfig.json +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/pnpm-workspace.yaml +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/scripts/build/inset-tsconfig.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/scripts/build/package-name.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/scripts/build/postbuild.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/scripts/build/prebuild-only.js +0 -0
- /package/{template-6.4.0-community → template-6.4.0}/scripts/clean.mjs +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/.prettierrc.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/README.md +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/_package.json +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/eslint.config.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/gitignore +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/lerna.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-admin-widget/index.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-admin-widget/scripts/postpublish.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-admin-widget/scripts/prepublish-only.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-admin-widget/src/index.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-admin-widget/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-admin-widget/src/shim-vue.d.ts +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/packages/ss-admin-widget/tsconfig.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-boot/.env +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-boot/.env.example +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/packages/ss-boot/package.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-boot/public/index.html +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-boot/public/manifest.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-boot/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-boot/src/shim-vue.d.ts +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/packages/ss-boot/tsconfig.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-oinone/index.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-oinone/scripts/postpublish.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-oinone/scripts/prepublish-only.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-oinone/src/index.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-oinone/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-oinone/src/shim-vue.d.ts +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/packages/ss-oinone/tsconfig.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-project/index.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-project/scripts/postpublish.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-project/scripts/prepublish-only.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-project/src/index.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-project/src/shim-translate.d.ts +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/packages/ss-project/src/shim-vue.d.ts +0 -0
- /package/{template-7.2.0-community → template-7.2.0}/packages/ss-project/tsconfig.json +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/pnpm-workspace.yaml +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/scripts/build/inset-tsconfig.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/scripts/build/package-name.js +0 -0
- /package/{template-6.4.0-enterprise → template-7.2.0}/scripts/clean.mjs +0 -0
package/README.md
CHANGED
|
@@ -1,115 +1,144 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Oinone Frontend CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CLI scaffolding tool to generate Oinone frontend projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Package: `@oinone/cli`
|
|
6
|
+
- Binary: `oinone-frontend`
|
|
7
|
+
- 中文文档: [README_zh-CN.md](./README_zh-CN.md)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
npm install -g @oinone/cli
|
|
9
|
-
```
|
|
9
|
+
## Features
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- Interactive project scaffolding with sensible defaults
|
|
12
|
+
- Non-interactive (CI-friendly) mode via CLI options
|
|
13
|
+
- Optional enterprise registry credential file generation
|
|
14
|
+
- Static resource cache management via `cache`
|
|
15
|
+
- Environment check via `doctor`
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
## Requirements
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
- Node.js to run the CLI
|
|
20
|
+
- pnpm is recommended for installing dependencies in the generated project
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
## Installation
|
|
18
23
|
|
|
19
|
-
```
|
|
20
|
-
oinone
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @oinone/cli
|
|
21
26
|
```
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
Or run with `npx`:
|
|
24
29
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Please select the Oinone edition: Community Edition (Default)
|
|
29
|
-
Please select the Oinone version: 7.2.0 (Default)
|
|
30
|
-
Do you want to download the latest static resources? (Y/n): Y
|
|
30
|
+
```bash
|
|
31
|
+
npx @oinone/cli create my-project
|
|
32
|
+
```
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
## Usage
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
### Quick create (recommended)
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
pnpm run dev
|
|
38
|
+
```bash
|
|
39
|
+
oinone-frontend create my-project --oinone-version 7.2.0 --edition community
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
```bash
|
|
43
|
+
oinone-frontend create my-project-enterprise --oinone-version 7.2.0 --edition enterprise --auth-token <token> --write-project-credential
|
|
44
|
+
```
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
### More examples
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
oinone-frontend <project-name>
|
|
47
|
-
```
|
|
48
|
+
Create project (interactive):
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
- `--oinone-version`: Specifies the Oinone version number (e.g., `7.2.0` or `6.4.0`). The default value is `7.2.0`.
|
|
53
|
-
- `--edition`: Specifies the Oinone edition to use. Optional values are `community` (default) or `enterprise`.
|
|
50
|
+
```bash
|
|
51
|
+
oinone-frontend create
|
|
52
|
+
```
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
Create project (non-interactive):
|
|
56
55
|
|
|
57
|
-
```
|
|
58
|
-
oinone-frontend my-project --
|
|
56
|
+
```bash
|
|
57
|
+
oinone-frontend create my-project --oinone-version 7.2.0 --edition community
|
|
59
58
|
```
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
Create project with `--company-name` / `--project-name`:
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
```bash
|
|
63
|
+
oinone-frontend create --company-name ss --project-name oms --oinone-version 7.2.0 --edition community
|
|
64
|
+
```
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
Dry-run (no files written):
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
oinone-frontend cache info
|
|
68
|
+
```bash
|
|
69
|
+
oinone-frontend create my-project --oinone-version 7.2.0 --edition community --dry-run
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
Create project (Oinone `6.4.*`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
oinone-frontend create my-project-64 --oinone-version 6.4.0 --edition community
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
oinone-frontend
|
|
78
|
+
### Check environment
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
oinone-frontend doctor --oinone-version 7.2.0
|
|
81
82
|
```
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
## Command reference
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
### Global options
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
| Option | Description |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `-l, --lang <lang>` | Language (`zh-CN` or `en-US`) |
|
|
91
|
+
| `-v, --version` | Print version |
|
|
92
|
+
| `-h, --help` | Show help |
|
|
90
93
|
|
|
91
|
-
|
|
94
|
+
### `oinone-frontend create [projectName]`
|
|
92
95
|
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
| Option | Description |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| `--company-name <name>` | Company/organization name (silent mode) |
|
|
99
|
+
| `--project-name <name>` | Project name (silent mode) |
|
|
100
|
+
| `--download-static-resource <boolean>` | Download static resources (`true`/`false`) |
|
|
101
|
+
| `-o, --oinone-version <version>` | Oinone version (e.g. `7.2.0`, `6.4.0`) |
|
|
102
|
+
| `-e, --edition <edition>` | Edition (`community`, `enterprise`) |
|
|
103
|
+
| `--auth-token <token>` | Enterprise registry auth token (optional) |
|
|
104
|
+
| `--write-project-credential` | Write `.npmrc` into the project and auto-add to `.gitignore` |
|
|
105
|
+
| `-f, --force` | Overwrite/merge into existing directory |
|
|
106
|
+
| `-d, --dry-run` | Dry-run (no files written) |
|
|
95
107
|
|
|
96
|
-
|
|
108
|
+
### `oinone-frontend doctor`
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
| Option | Description |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| `-o, --oinone-version <version>` | Oinone version to validate against (`6.4.*` or `7.2+`) |
|
|
101
113
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
### `oinone-frontend cache`
|
|
115
|
+
|
|
116
|
+
| Command | Description |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| `cache info` | Print cache directory information |
|
|
119
|
+
| `cache clean` | Clean cached static resources |
|
|
120
|
+
|
|
121
|
+
## Enterprise credentials
|
|
122
|
+
|
|
123
|
+
When `--write-project-credential` is enabled for enterprise edition, the CLI writes `.npmrc` into the project directory and appends it to `.gitignore`.
|
|
124
|
+
|
|
125
|
+
## Template mapping
|
|
106
126
|
|
|
107
|
-
|
|
127
|
+
- `6.4.*` → `template-6.4.0`
|
|
128
|
+
- `7.2+` → `template-7.2.0`
|
|
108
129
|
|
|
109
|
-
|
|
130
|
+
Unsupported versions fail fast.
|
|
110
131
|
|
|
111
|
-
|
|
112
|
-
|
|
132
|
+
## Notes
|
|
133
|
+
|
|
134
|
+
Uninstalling the CLI does not remove cached static resources. To clean the cache:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
oinone-frontend cache clean
|
|
113
138
|
```
|
|
114
139
|
|
|
115
|
-
|
|
140
|
+
## Development
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm test
|
|
144
|
+
```
|
package/README_zh-CN.md
CHANGED
|
@@ -1,115 +1,144 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Oinone Frontend CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
用于生成 Oinone 前端工程的脚手架 CLI。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- 包名:`@oinone/cli`
|
|
6
|
+
- 命令:`oinone-frontend`
|
|
7
|
+
- English: [README.md](./README.md)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
npm install -g @oinone/cli
|
|
9
|
-
```
|
|
9
|
+
## 功能特性
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- 交互式创建工程,内置默认值与合理校验
|
|
12
|
+
- 支持参数静默创建(适用于 CI/CD)
|
|
13
|
+
- 企业版可选生成仓库凭证文件
|
|
14
|
+
- 提供 `cache` 静态资源缓存管理
|
|
15
|
+
- 提供 `doctor` 环境检查
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
## 环境要求
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
- 运行 CLI:Node.js
|
|
20
|
+
- 安装生成的前端工程依赖:建议使用 pnpm
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
## 安装
|
|
18
23
|
|
|
19
|
-
```
|
|
20
|
-
oinone
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g @oinone/cli
|
|
21
26
|
```
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
或使用 `npx`:
|
|
24
29
|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Please select the Oinone edition: Community Edition (Default)
|
|
29
|
-
Please select the Oinone version: 7.2.0 (Default)
|
|
30
|
-
Do you want to download the latest static resources? (Y/n): Y
|
|
30
|
+
```bash
|
|
31
|
+
npx @oinone/cli create my-project
|
|
32
|
+
```
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
## 使用
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
### 快速创建(推荐)
|
|
35
37
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
pnpm run dev
|
|
38
|
+
```bash
|
|
39
|
+
oinone-frontend create my-project --oinone-version 7.2.0 --edition community
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
|
|
42
|
+
```bash
|
|
43
|
+
oinone-frontend create my-project-enterprise --oinone-version 7.2.0 --edition enterprise --auth-token <token> --write-project-credential
|
|
44
|
+
```
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
### 更多示例
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
oinone-frontend <project-name>
|
|
47
|
-
```
|
|
48
|
+
创建项目(交互式):
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
- `--oinone-version`: 指定 Oinone 的版本号(如 `7.2.0` 或 `6.4.0`)。默认值为 `7.2.0`。
|
|
53
|
-
- `--edition`: 指定要使用的 Oinone 版本(社区版/企业版)。可选值为 `community` (默认) 或 `enterprise`。
|
|
50
|
+
```bash
|
|
51
|
+
oinone-frontend create
|
|
52
|
+
```
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
创建项目(静默式):
|
|
56
55
|
|
|
57
|
-
```
|
|
58
|
-
oinone-frontend my-project --
|
|
56
|
+
```bash
|
|
57
|
+
oinone-frontend create my-project --oinone-version 7.2.0 --edition community
|
|
59
58
|
```
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
使用 `--company-name` / `--project-name` 创建:
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
```bash
|
|
63
|
+
oinone-frontend create --company-name ss --project-name oms --oinone-version 7.2.0 --edition community
|
|
64
|
+
```
|
|
64
65
|
|
|
65
|
-
|
|
66
|
+
演练模式(不落盘):
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
oinone-frontend cache info
|
|
68
|
+
```bash
|
|
69
|
+
oinone-frontend create my-project --oinone-version 7.2.0 --edition community --dry-run
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
创建工程(Oinone `6.4.*`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
oinone-frontend create my-project-64 --oinone-version 6.4.0 --edition community
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
oinone-frontend
|
|
78
|
+
### 检查环境
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
oinone-frontend doctor --oinone-version 7.2.0
|
|
81
82
|
```
|
|
82
83
|
|
|
83
|
-
|
|
84
|
+
## 命令参考
|
|
84
85
|
|
|
85
|
-
|
|
86
|
+
### 全局参数
|
|
86
87
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
| 参数 | 说明 |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `-l, --lang <lang>` | 语言(`zh-CN` / `en-US`) |
|
|
91
|
+
| `-v, --version` | 输出版本号 |
|
|
92
|
+
| `-h, --help` | 输出帮助 |
|
|
90
93
|
|
|
91
|
-
|
|
94
|
+
### `oinone-frontend create [projectName]`
|
|
92
95
|
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
| 参数 | 说明 |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| `--company-name <name>` | 静默模式:公司/组织简称 |
|
|
99
|
+
| `--project-name <name>` | 静默模式:项目名;与 `--company-name` 同用时目录名为 `{company}-{project}-frontend` |
|
|
100
|
+
| `--download-static-resource <boolean>` | 是否下载静态资源(`true` / `false`) |
|
|
101
|
+
| `-o, --oinone-version <version>` | Oinone 版本(例如 `7.2.0` / `6.4.0`) |
|
|
102
|
+
| `-e, --edition <edition>` | 版本类型(`community` / `enterprise`) |
|
|
103
|
+
| `--auth-token <token>` | 企业版仓库 auth token(可选) |
|
|
104
|
+
| `--write-project-credential` | 在项目目录写入 `.npmrc` 并自动加入 `.gitignore` |
|
|
105
|
+
| `-f, --force` | 目标目录存在时覆盖/合并 |
|
|
106
|
+
| `-d, --dry-run` | 演练模式:不落盘 |
|
|
95
107
|
|
|
96
|
-
|
|
108
|
+
### `oinone-frontend doctor`
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
| 参数 | 说明 |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| `-o, --oinone-version <version>` | 用于校验的 Oinone 版本(仅支持 `6.4.*` 与 `7.2+`) |
|
|
101
113
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
### `oinone-frontend cache`
|
|
115
|
+
|
|
116
|
+
| 命令 | 说明 |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| `cache info` | 打印缓存目录信息 |
|
|
119
|
+
| `cache clean` | 清理缓存的静态资源 |
|
|
120
|
+
|
|
121
|
+
## 企业版凭证
|
|
122
|
+
|
|
123
|
+
当企业版创建时启用 `--write-project-credential`,CLI 会在项目目录写入 `.npmrc`,并把它追加到 `.gitignore`。
|
|
124
|
+
|
|
125
|
+
## 模板映射
|
|
106
126
|
|
|
107
|
-
|
|
127
|
+
- `6.4.*` → `template-6.4.0`
|
|
128
|
+
- `7.2+` → `template-7.2.0`
|
|
108
129
|
|
|
109
|
-
|
|
130
|
+
不支持的版本会直接报错。
|
|
110
131
|
|
|
111
|
-
|
|
112
|
-
|
|
132
|
+
## 备注
|
|
133
|
+
|
|
134
|
+
卸载 CLI 不会清理系统临时目录中的静态资源缓存。如需清理:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
oinone-frontend cache clean
|
|
113
138
|
```
|
|
114
139
|
|
|
115
|
-
|
|
140
|
+
## 开发
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm test
|
|
144
|
+
```
|