comp-hub 0.43.9 → 0.43.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comp-hub",
3
- "version": "0.43.9",
3
+ "version": "0.43.11",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "comphub": "dist/cli.js",
@@ -19,9 +19,7 @@
19
19
  },
20
20
  "files": [
21
21
  "dist",
22
- "README.md",
23
- "README.zh-CN.md",
24
- "README.zh-Hant.md"
22
+ "README.md"
25
23
  ],
26
24
  "dependencies": {
27
25
  "esbuild": "^0.28.0"
package/README.zh-CN.md DELETED
@@ -1,144 +0,0 @@
1
- <div align="right">
2
-
3
- [English](README.md) · **简体中文** · [繁體中文](README.zh-Hant.md)
4
-
5
- </div>
6
-
7
- # comp-hub
8
-
9
- comp-hub 的 CLI —— 一个同时支持 Vue 与 React 的组件共享平台。在本地启动开发服务器,即可预览、管理和共享组件。
10
-
11
- [![npm version](https://img.shields.io/npm/v/comp-hub)](https://www.npmjs.com/package/comp-hub)
12
- [![Node.js](https://img.shields.io/badge/node-%3E%3D16-brightgreen)](https://nodejs.org)
13
-
14
- **官网:** <https://www.comphub.cn> &nbsp;·&nbsp; **文档站:** <https://docs.comphub.cn>
15
-
16
- ## 环境要求
17
-
18
- - Node.js >= 16.0.0
19
- - npm >= 8.0.0
20
-
21
- ## 安装
22
-
23
- **全局安装(推荐)**
24
-
25
- ```bash
26
- npm install comp-hub@latest -g
27
- ```
28
-
29
- **本地安装**
30
-
31
- ```bash
32
- npm install comp-hub@latest -D
33
- ```
34
-
35
- ## 快速开始
36
-
37
- 在项目目录中运行:
38
-
39
- ```bash
40
- comphub
41
- ```
42
-
43
- 启动后,打开终端里显示的地址(默认 `http://localhost:5478`)。
44
-
45
- > `ch` 是 `comphub` 的简写别名,以下所有命令均可互换使用,例如 `ch`、`ch status`、`ch -p 8080`。
46
-
47
- ### CLI 选项
48
-
49
- ```bash
50
- comphub [options]
51
- ```
52
-
53
- | 选项 | 别名 | 类型 | 默认值 | 说明 |
54
- |------|------|------|--------|------|
55
- | `--port` | `-p` | number | 5478 | 服务端口 |
56
- | `--dir` | `-d` | path | `"./"` | 组件目录 |
57
- | `--version` | `-v` | — | — | 显示版本 |
58
- | `--help` | `-h` | — | — | 显示帮助 |
59
-
60
- 示例:
61
-
62
- ```bash
63
- comphub -p 8080 # 自定义端口
64
- comphub -d ./src # 自定义组件目录
65
- ```
66
-
67
- ### 管理命令
68
-
69
- | 命令 | 说明 |
70
- |------|------|
71
- | `comphub` | 启动开发服务器 |
72
- | `comphub status` | 列出所有正在运行的项目 |
73
- | `comphub stop <hash>` | 停止指定项目 |
74
- | `comphub stop --all` | 停止所有项目 |
75
- | `comphub kill` | 关闭所有服务 |
76
-
77
- 示例:
78
-
79
- ```bash
80
- # 查看正在运行的项目
81
- comphub status
82
-
83
- # 停止某个项目
84
- comphub stop 94525912
85
-
86
- # 停止所有项目
87
- comphub stop --all
88
-
89
- # 关闭全部
90
- comphub kill
91
- ```
92
-
93
- ### 多项目
94
-
95
- 在不同的端口上同时运行多个项目:
96
-
97
- ```bash
98
- cd /path/to/project-a && comphub
99
- cd /path/to/project-b && comphub
100
- comphub status # 查看全部
101
- ```
102
-
103
- ## 配置
104
-
105
- 在项目根目录创建 `.comphub.json` 或 `.comphub.js`:
106
-
107
- ```json
108
- {
109
- "dir": "./src",
110
- "allowDebug": false
111
- }
112
- ```
113
-
114
- ```javascript
115
- module.exports = {
116
- dir: './src',
117
- allowDebug: false
118
- }
119
- ```
120
-
121
- | 选项 | 类型 | 默认值 | 说明 |
122
- |------|------|--------|------|
123
- | `dir` | string | `"./"` | 组件根目录 |
124
- | `allowDebug` | boolean | false | 启用调试模式 |
125
- | `proxy` | object | — | 自定义代理规则 |
126
-
127
- **优先级**:命令行参数 > 配置文件 > 默认值
128
-
129
- ## 组件规范
130
-
131
- - 组件以**文件夹**形式上传——文件夹名即组件名
132
- - 入口文件:`index.vue`(Vue)或 `index.jsx` / `index.tsx`(React)
133
- - 建议包含说明用法的 `README.md`
134
- - 可选 `comp.json` 用于组件元信息(名称、版本、依赖等)
135
- - 可选 `demo/` 目录存放预览配置
136
-
137
- ## 链接
138
-
139
- - 官网:<https://www.comphub.cn>
140
- - 文档站:<https://docs.comphub.cn>
141
-
142
- ## 许可证
143
-
144
- [MIT](LICENSE)
package/README.zh-Hant.md DELETED
@@ -1,144 +0,0 @@
1
- <div align="right">
2
-
3
- [English](README.md) · [简体中文](README.zh-CN.md) · **繁體中文**
4
-
5
- </div>
6
-
7
- # comp-hub
8
-
9
- comp-hub 的 CLI —— 一個同時支援 Vue 與 React 的元件分享平台。在本地啟動開發伺服器,即可預覽、管理和分享元件。
10
-
11
- [![npm version](https://img.shields.io/npm/v/comp-hub)](https://www.npmjs.com/package/comp-hub)
12
- [![Node.js](https://img.shields.io/badge/node-%3E%3D16-brightgreen)](https://nodejs.org)
13
-
14
- **官網:** <https://www.comphub.cn> &nbsp;·&nbsp; **文件站:** <https://docs.comphub.cn>
15
-
16
- ## 環境需求
17
-
18
- - Node.js >= 16.0.0
19
- - npm >= 8.0.0
20
-
21
- ## 安裝
22
-
23
- **全域安裝(建議)**
24
-
25
- ```bash
26
- npm install comp-hub@latest -g
27
- ```
28
-
29
- **本機安裝**
30
-
31
- ```bash
32
- npm install comp-hub@latest -D
33
- ```
34
-
35
- ## 快速開始
36
-
37
- 在專案目錄中執行:
38
-
39
- ```bash
40
- comphub
41
- ```
42
-
43
- 啟動後,開啟終端機裡顯示的位址(預設 `http://localhost:5478`)。
44
-
45
- > `ch` 是 `comphub` 的簡寫別名,以下所有指令均可互換使用,例如 `ch`、`ch status`、`ch -p 8080`。
46
-
47
- ### CLI 選項
48
-
49
- ```bash
50
- comphub [options]
51
- ```
52
-
53
- | 選項 | 別名 | 型別 | 預設值 | 說明 |
54
- |------|------|------|--------|------|
55
- | `--port` | `-p` | number | 5478 | 服務連接埠 |
56
- | `--dir` | `-d` | path | `"./"` | 元件目錄 |
57
- | `--version` | `-v` | — | — | 顯示版本 |
58
- | `--help` | `-h` | — | — | 顯示說明 |
59
-
60
- 範例:
61
-
62
- ```bash
63
- comphub -p 8080 # 自訂連接埠
64
- comphub -d ./src # 自訂元件目錄
65
- ```
66
-
67
- ### 管理指令
68
-
69
- | 指令 | 說明 |
70
- |------|------|
71
- | `comphub` | 啟動開發伺服器 |
72
- | `comphub status` | 列出所有正在執行的專案 |
73
- | `comphub stop <hash>` | 停止指定專案 |
74
- | `comphub stop --all` | 停止所有專案 |
75
- | `comphub kill` | 關閉所有服務 |
76
-
77
- 範例:
78
-
79
- ```bash
80
- # 查看正在執行的專案
81
- comphub status
82
-
83
- # 停止某個專案
84
- comphub stop 94525912
85
-
86
- # 停止所有專案
87
- comphub stop --all
88
-
89
- # 關閉全部
90
- comphub kill
91
- ```
92
-
93
- ### 多專案
94
-
95
- 在不同的連接埠上同時執行多個專案:
96
-
97
- ```bash
98
- cd /path/to/project-a && comphub
99
- cd /path/to/project-b && comphub
100
- comphub status # 查看全部
101
- ```
102
-
103
- ## 設定
104
-
105
- 在專案根目錄建立 `.comphub.json` 或 `.comphub.js`:
106
-
107
- ```json
108
- {
109
- "dir": "./src",
110
- "allowDebug": false
111
- }
112
- ```
113
-
114
- ```javascript
115
- module.exports = {
116
- dir: './src',
117
- allowDebug: false
118
- }
119
- ```
120
-
121
- | 選項 | 型別 | 預設值 | 說明 |
122
- |------|------|--------|------|
123
- | `dir` | string | `"./"` | 元件根目錄 |
124
- | `allowDebug` | boolean | false | 啟用偵錯模式 |
125
- | `proxy` | object | — | 自訂代理規則 |
126
-
127
- **優先順序**:命令列參數 > 設定檔 > 預設值
128
-
129
- ## 元件規範
130
-
131
- - 元件以**資料夾**形式上傳——資料夾名稱即元件名稱
132
- - 進入點:`index.vue`(Vue)或 `index.jsx` / `index.tsx`(React)
133
- - 建議包含說明用法的 `README.md`
134
- - 選用的 `comp.json` 可存放元件後設資料(名稱、版本、依賴等)
135
- - 選用的 `demo/` 目錄可存放預覽設定
136
-
137
- ## 連結
138
-
139
- - 官網:<https://www.comphub.cn>
140
- - 文件站:<https://docs.comphub.cn>
141
-
142
- ## 授權
143
-
144
- [MIT](LICENSE)