@freelog-cli/cli2 0.5.0 → 0.5.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 +11 -69
- package/dist/bin/index.js +28221 -16410
- package/dist/bin/index.js.map +1 -1
- package/dist/docs/01-/345/277/253/351/200/237/344/270/212/346/211/213.md +83 -0
- package/dist/docs/02-/346/227/245/345/270/270/350/267/257/345/276/204.md +92 -0
- package/dist/docs/03-/344/270/273/351/242/230/344/270/216/346/217/222/344/273/266.md +124 -0
- package/dist/docs/04-/347/211/210/346/234/254/345/267/245/344/275/234/347/250/277.md +108 -0
- package/dist/docs/05-/350/265/204/346/272/220/347/256/241/347/220/206.md +69 -0
- package/dist/docs/06-/345/270/270/350/247/201/346/203/205/345/206/265/344/270/216/346/212/245/351/224/231.md +37 -0
- package/dist/docs/07-/347/216/257/345/242/203/344/270/216/345/207/255/346/215/256.md +60 -0
- package/dist/docs/08-/346/234/254/345/234/260/346/226/207/344/273/266/345/217/202/350/200/203.md +81 -0
- package/dist/docs/09-/346/214/211/345/234/272/346/231/257/346/223/215/344/275/234.md +138 -0
- package/dist/docs/10-/345/221/275/344/273/244/345/217/202/350/200/203.md +95 -0
- package/dist/docs/README.md +93 -0
- package/package.json +18 -56
- package/compat/template-compat.json +0 -44
- package/dist/bin/index.d.ts +0 -1
- package/dist/compat-Ba3r5ie_.js +0 -23634
- package/dist/compat-Ba3r5ie_.js.map +0 -1
- package/dist/index.d.ts +0 -145
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
package/README.md
CHANGED
|
@@ -1,79 +1,21 @@
|
|
|
1
1
|
# @freelog-cli/cli2
|
|
2
2
|
|
|
3
|
-
Freelog
|
|
3
|
+
Freelog 单资源 CLI:支持普通文件资源、主题与插件的初始化、创建、发版本和管理。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 安装
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
需要 Node.js 20 或更高版本:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
完整使用说明见 [CLI 使用文档目录](../../docs/新方案/使用/README.md)(建议从 [快速上手](../../docs/新方案/使用/快速上手.md) 开始)。源码依赖方向见 [ARCHITECTURE.md](./src/ARCHITECTURE.md)。
|
|
14
|
-
|
|
15
|
-
## 命令面
|
|
16
|
-
|
|
17
|
-
| 类型 | 命令 |
|
|
18
|
-
|---|---|
|
|
19
|
-
| 全局 | `login` `logout` `status` `bind` `pull` |
|
|
20
|
-
| 类型 | `type list` `type search` `type info` |
|
|
21
|
-
| 初始化 | `init` |
|
|
22
|
-
| 独立资源 | `create` `update` `version set` `publish` `draft *` `dep *` `policy *` `online` `offline` `version edit` |
|
|
23
|
-
| 多资源 | `resource import-dir` |
|
|
24
|
-
| 合集 | `collection create` `collection item *` `collection version set` `collection publish` `collection collect-rules *` `collection rss *` |
|
|
25
|
-
| 交互壳 | `session`(11 · 全临时 TTY) `studio`(10 · 多账号工作区 TTY) |
|
|
26
|
-
|
|
27
|
-
四模式 10/11 说明见 [交互会话与多账号工作区](../../docs/新方案/使用/交互会话与多账号工作区.md)。
|
|
28
|
-
|
|
29
|
-
## 示例
|
|
30
|
-
|
|
31
|
-
已有主题 / 插件项目接入:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
freelog-cli type search 主题
|
|
35
|
-
freelog-cli init . --scaffold none --resource-type <themeCode> --artifact-mode directory-zip --runtime 0.5 --yes
|
|
36
|
-
pnpm build
|
|
37
|
-
freelog-cli create
|
|
38
|
-
freelog-cli version set --version 1.0.0 --file dist --runtime 0.5
|
|
39
|
-
freelog-cli publish
|
|
9
|
+
```powershell
|
|
10
|
+
npm install --global @freelog-cli/cli2
|
|
11
|
+
freelog-cli --cli-version
|
|
12
|
+
freelog-cli --help
|
|
40
13
|
```
|
|
41
14
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
freelog-cli init theme my-theme --template vite-react-ts --runtime 0.5 --yes
|
|
46
|
-
cd my-theme
|
|
47
|
-
pnpm build
|
|
48
|
-
freelog-cli create
|
|
49
|
-
freelog-cli version set --version 1.0.0 --file dist --runtime 0.5
|
|
50
|
-
freelog-cli publish
|
|
51
|
-
freelog-cli policy apply --from-file ./policy.json --yes
|
|
52
|
-
freelog-cli online --yes
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
图片文件夹作为多个独立资源:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
freelog-cli resource import-dir ./photos --resource-type <imageCode> --title-prefix "照片" --yes
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
图片文件夹作为合集:
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
freelog-cli init album --scaffold collection --resource-type <collectionCode> --yes
|
|
65
|
-
cd album
|
|
66
|
-
freelog-cli collection create
|
|
67
|
-
freelog-cli collection item import-dir ../photos --resource-type <imageCode> --yes
|
|
68
|
-
freelog-cli collection version set --version 1.0.0 --description "first album"
|
|
69
|
-
freelog-cli collection publish --yes
|
|
70
|
-
freelog-cli policy apply --from-file ./policy.json --yes
|
|
71
|
-
freelog-cli online --yes
|
|
72
|
-
```
|
|
15
|
+
若命令找不到,请重新打开终端,并确认 npm 的全局可执行目录已在 `PATH` 中。
|
|
73
16
|
|
|
74
|
-
##
|
|
17
|
+
## 从哪里开始
|
|
75
18
|
|
|
76
|
-
|
|
77
|
-
- `.freelog/state.json`:CLI 平台状态,不提交 git。
|
|
19
|
+
首次使用在交互终端运行 `freelog-cli login --env dev`,再按 [完整使用手册](./dist/docs/README.md) 的“快速开始”创建和发行第一个资源。`freelog-cli --help` 同时会打印安装后该手册的本机绝对路径。
|
|
78
20
|
|
|
79
|
-
CLI
|
|
21
|
+
正式环境目前由 CLI 拦截;联调时显式传 `--env dev` 或 `--env test`。
|