create-simpleadmin-ui 2.0.0 → 2.0.2

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 CHANGED
@@ -2,8 +2,17 @@
2
2
 
3
3
  交互式创建 **SimpleAdmin Vue3(Element Plus)** 管理前端脚手架。模板源为同级 [`Temp.SimpleAdmin.UI.Vue3`](../Temp.SimpleAdmin.UI.Vue3)。
4
4
 
5
+ | 文档 | 说明 |
6
+ |------|------|
7
+ | 本文 | 用法、本地开发、生成后步骤 |
8
+ | [Document/PUBLISH.md](Document/PUBLISH.md) | **发布到 npm 公共仓库**(含淘宝镜像下如何 login / publish) |
9
+
10
+ ---
11
+
5
12
  ## 用法(对外)
6
13
 
14
+ 需已将本包发布到 [npmjs.com](https://www.npmjs.com/package/create-simpleadmin-ui)(或可访问的 registry):
15
+
7
16
  ```bash
8
17
  npm create simpleadmin-ui@latest
9
18
  # 或指定目录名
@@ -23,30 +32,48 @@ yarn create simpleadmin-ui
23
32
  npx create-simpleadmin-ui my-admin -y --title MyAdmin --pm none
24
33
  ```
25
34
 
35
+ 常用参数见 `npx create-simpleadmin-ui --help`(`-y` / `--title` / `--api-proxy` / `--port` / `--pm` 等)。
36
+
37
+ ---
38
+
26
39
  ## 本地开发(本仓库)
27
40
 
41
+ 无需发布,可直接跑 CLI(优先读已 sync 的 `template/`,否则回退同级 `Temp.SimpleAdmin.UI.Vue3`):
42
+
28
43
  ```bash
29
44
  cd ProjectTemplates/DotNetCore/Temp.SimpleAdmin/create-simpleadmin-ui
30
45
  npm install
31
46
  npm run sync-template # 从 ../Temp.SimpleAdmin.UI.Vue3 同步到 template/
32
47
  node ./bin/create-simpleadmin-ui.mjs demo-ui
48
+ # 或
49
+ npm start
33
50
  ```
34
51
 
35
- 未执行 sync 时,CLI 会回退读取同级 `Temp.SimpleAdmin.UI.Vue3`(便于改模板后立刻试跑)。
52
+ `template/` sync 生成,已在 `.gitignore` 中;`npm pack` / `npm publish` 时 `prepack` 会自动同步。
53
+
54
+ ---
55
+
56
+ ## 发布到 npm(摘要)
57
+
58
+ 推荐一键脚本(手动输入版本;强制官方源;未登录会提示并暂停):
59
+
60
+ ```bat
61
+ cd ProjectTemplates\DotNetCore\Temp.SimpleAdmin\create-simpleadmin-ui
62
+ pack.bat
63
+ pack.bat push
64
+ ```
36
65
 
37
- ## 发布到 npm
66
+ 完整步骤、2FA、淘宝镜像说明见 **[Document/PUBLISH.md](Document/PUBLISH.md)**。
38
67
 
39
- 1. 确认 `Temp.SimpleAdmin.UI.Vue3` 为期望内容(`node_modules` / `dist` 不会打进包)。
40
- 2. bump `package.json` 的 `version`。
41
- 3. `npm publish`(`prepack` 会自动 `sync-template`)。
68
+ 包内 `files`:`bin` / `src` / `template`(不含 `pack.bat`)。
42
69
 
43
- 包内 `files` 仅含 `bin` / `src` / `template`。
70
+ ---
44
71
 
45
72
  ## 生成后
46
73
 
47
74
  ```bash
48
75
  cd <项目名>
49
- npm run dev # 默认 http://localhost:5173,代理到后端
76
+ npm install && npm run dev # 默认 http://localhost:5173,代理到后端
50
77
  npm run build
51
78
  ```
52
79
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-simpleadmin-ui",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "交互式创建 SimpleAdmin Vue3 管理前端脚手架",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,8 +19,22 @@ npm run build # dist/;生产 env 由 CI 注入
19
19
  npm create simpleadmin-ui@latest
20
20
  ```
21
21
 
22
+ | 文档 | 说明 |
23
+ |------|------|
24
+ | [create-simpleadmin-ui/README](../create-simpleadmin-ui/README.md) | 用法与本地试跑 |
25
+ | [Document/PUBLISH.md](../create-simpleadmin-ui/Document/PUBLISH.md) | 发布到 npm |
26
+ | [create-simpleadmin-ui/pack.bat](../create-simpleadmin-ui/pack.bat) | **一键打包 / 发布** |
27
+
22
28
  本地试跑(无需发布):
23
29
 
24
30
  ```bash
25
31
  cd ../create-simpleadmin-ui && npm install && npm start
26
32
  ```
33
+
34
+ 一键发布 CLI 到 npm:
35
+
36
+ ```bat
37
+ cd ..\create-simpleadmin-ui
38
+ pack.bat
39
+ pack.bat push
40
+ ```