pangu-chart-cli 1.0.0
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/LICENSE +21 -0
- package/README.md +549 -0
- package/bin/index.js +3 -0
- package/dist/build/index.js +2 -0
- package/dist/dev/index.js +2 -0
- package/dist/index.js +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/viteConfig/base.js +2 -0
- package/dist/viteConfig/default.js +2 -0
- package/dist/viteConfig/entry.js +2 -0
- package/dist/viteConfig/index.js +2 -0
- package/dist/viteConfig/vite-plugin-element-namespace.js +2 -0
- package/index.d.ts +53 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 樱花下的市丸银
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
# pangu-chart-cli
|
|
2
|
+
|
|
3
|
+
一个专注于 Vue 3 可视化组件库打包的 Vite 配置生成器。
|
|
4
|
+
|
|
5
|
+
## 简介
|
|
6
|
+
|
|
7
|
+
`pangu-chart-cli` 是一个专为 Vue 3 chart/可视化组件库设计的打包工具。它简化了 Vite 配置流程,自动处理 Element Plus namespace、banner 注入、CSS 代码分割等复杂配置,让开发者专注于组件开发本身。
|
|
8
|
+
|
|
9
|
+
**核心特性**:
|
|
10
|
+
|
|
11
|
+
- 自动生成 Vite 配置(UMD + ES 双格式输出)
|
|
12
|
+
- Element Plus CSS namespace 自定义(避免样式冲突)
|
|
13
|
+
- 自动添加 banner(包含 name/version/author/时间戳)
|
|
14
|
+
- 开发服务自动检测 `example` 目录
|
|
15
|
+
- CSS 代码分割 + Gzip 压缩
|
|
16
|
+
- TypeScript 类型支持
|
|
17
|
+
|
|
18
|
+
**适用场景**:
|
|
19
|
+
|
|
20
|
+
- Vue 3 组件库开发
|
|
21
|
+
- 可视化图表库打包
|
|
22
|
+
- Element Plus 二次封装组件库
|
|
23
|
+
|
|
24
|
+
## 安装
|
|
25
|
+
|
|
26
|
+
### 全局安装
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install -g pangu-chart-cli
|
|
30
|
+
# 或
|
|
31
|
+
pnpm add -g pangu-chart-cli
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 项目依赖
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install --save-dev pangu-chart-cli
|
|
38
|
+
# 或
|
|
39
|
+
pnpm add -D pangu-chart-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## CLI 命令
|
|
43
|
+
|
|
44
|
+
CLI 工具提供两个命令别名:`vcc` 和 `vis-chart-cli`,以下以 `vcc` 为例。
|
|
45
|
+
|
|
46
|
+
### vcc dev / vcc d
|
|
47
|
+
|
|
48
|
+
启动 Vite 开发服务。
|
|
49
|
+
|
|
50
|
+
**执行逻辑**:
|
|
51
|
+
|
|
52
|
+
1. 检测项目根目录下的 `example/package.json` 是否存在
|
|
53
|
+
2. 若存在,进入 `example` 目录执行开发服务
|
|
54
|
+
3. 若不存在,在项目根目录执行开发服务
|
|
55
|
+
4. 若目标目录无 `vite.config.js` 或 `vite.config.ts`,使用内置默认配置
|
|
56
|
+
5. 服务监听 `0.0.0.0`(局域网可访问)
|
|
57
|
+
|
|
58
|
+
**使用示例**:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
vcc dev
|
|
62
|
+
# 或
|
|
63
|
+
vcc d
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### vcc build / vcc b
|
|
67
|
+
|
|
68
|
+
执行 Vite 打包。
|
|
69
|
+
|
|
70
|
+
**执行逻辑**:
|
|
71
|
+
|
|
72
|
+
1. 在项目根目录查找 `vite.config.js` 或 `vite.config.ts`
|
|
73
|
+
2. 若无配置文件,使用内置默认配置
|
|
74
|
+
3. 输出 UMD + ES 双格式
|
|
75
|
+
4. 自动添加 banner(包含组件名称、版本、作者、构建时间)
|
|
76
|
+
5. 清理隐藏文件(`._*`、`.DS_Store`)
|
|
77
|
+
|
|
78
|
+
**使用示例**:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
vcc build
|
|
82
|
+
# 或
|
|
83
|
+
vcc b
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### vcc -v
|
|
87
|
+
|
|
88
|
+
查看当前版本号。
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
vcc -v
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## API 文档
|
|
95
|
+
|
|
96
|
+
本工具提供三个核心 API 函数,用于在 `vite.config.js` 中生成配置。
|
|
97
|
+
|
|
98
|
+
### getConfig(config)
|
|
99
|
+
|
|
100
|
+
生成完整的 Vite UserConfig 配置对象。
|
|
101
|
+
|
|
102
|
+
**参数**:
|
|
103
|
+
|
|
104
|
+
| 参数名 | 类型 | 必填 | 说明 |
|
|
105
|
+
| --------------- | ------------------- | ---- | --------------------------- |
|
|
106
|
+
| `name` | `string` | ✓ | package.json 中的组件名称 |
|
|
107
|
+
| `version` | `string` | ✓ | package.json 中的版本号 |
|
|
108
|
+
| `author` | `string` | - | 作者信息,用于 banner |
|
|
109
|
+
| `elementConfig` | `boolean \| object` | - | Element Plus namespace 配置 |
|
|
110
|
+
|
|
111
|
+
**返回值结构**:
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
{
|
|
115
|
+
// 全局变量定义
|
|
116
|
+
define: {
|
|
117
|
+
'process.env': process.env || {}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
// 插件列表
|
|
121
|
+
plugins: [
|
|
122
|
+
// 若启用 elementConfig,包含 elementNamespacePlugin
|
|
123
|
+
vue({ isProduction: true }),
|
|
124
|
+
compression({ ext: '.gz', deleteOriginFile: false }),
|
|
125
|
+
banner({
|
|
126
|
+
outDir: '<输出目录路径>',
|
|
127
|
+
content: '<组件名> v<版本号> Author: <作者> Date: <时间戳>'
|
|
128
|
+
})
|
|
129
|
+
],
|
|
130
|
+
|
|
131
|
+
// 开发服务器配置
|
|
132
|
+
server: {
|
|
133
|
+
host: '0.0.0.0' // 局域网可访问
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// CSS 预处理器配置(若启用 elementConfig)
|
|
137
|
+
css: {
|
|
138
|
+
preprocessorOptions: {
|
|
139
|
+
scss: {
|
|
140
|
+
additionalData: "@forward '<config.scss路径>' with (\n $namespace: '<namespace名称>'\n);"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
// 构建配置
|
|
146
|
+
build: {
|
|
147
|
+
target: ['chrome94', 'edge94', 'firefox92'], // 浏览器兼容目标
|
|
148
|
+
reportCompressedSize: false, // 不报告压缩大小
|
|
149
|
+
emptyOutDir: true, // 清空输出目录
|
|
150
|
+
outDir: '<组件名>_v<版本号>', // 输出目录名
|
|
151
|
+
cssCodeSplit: true, // CSS 代码分割
|
|
152
|
+
|
|
153
|
+
// 库模式配置
|
|
154
|
+
lib: {
|
|
155
|
+
entry: './index.js', // 入口文件
|
|
156
|
+
formats: ['umd', 'es'], // 输出格式
|
|
157
|
+
name: '<大写组件名>_v<版本号>', // UMD 全局变量名
|
|
158
|
+
fileName: (format) => format === 'es' ? 'es/index.js' : 'index.js'
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
// Rollup 配置
|
|
162
|
+
rollupOptions: {
|
|
163
|
+
external: ['vue'], // 外部化依赖
|
|
164
|
+
output: {
|
|
165
|
+
globals: { vue: 'Vue' }, // UMD 全局变量映射
|
|
166
|
+
chunkFileNames: 'es/js/[name]-[hash].js', // chunk 文件名格式
|
|
167
|
+
assetFileNames: (assetInfo) => { // 资源文件名格式
|
|
168
|
+
if (assetInfo.name?.endsWith('.css')) {
|
|
169
|
+
return 'es/style.css'
|
|
170
|
+
}
|
|
171
|
+
return 'es/assets/[name]-[hash][extname]'
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**使用示例**:
|
|
180
|
+
|
|
181
|
+
```javascript
|
|
182
|
+
import { getConfig } from 'pangu-chart-cli';
|
|
183
|
+
|
|
184
|
+
export default getConfig({
|
|
185
|
+
name: 'my-chart',
|
|
186
|
+
version: '1.0.0',
|
|
187
|
+
author: 'Your Name',
|
|
188
|
+
elementConfig: {
|
|
189
|
+
enable: true,
|
|
190
|
+
entryFile: 'src/index.vue',
|
|
191
|
+
configSrc: 'element-plus/theme-chalk/src/mixins/config.scss',
|
|
192
|
+
namespace: 'MyChart'
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### getBaseConfig(config)
|
|
198
|
+
|
|
199
|
+
生成基础的 build 配置对象(不含 plugins),用于自定义扩展。
|
|
200
|
+
|
|
201
|
+
**参数**:
|
|
202
|
+
|
|
203
|
+
| 参数名 | 类型 | 必填 | 说明 |
|
|
204
|
+
| --------- | -------- | ---- | ------------------------- |
|
|
205
|
+
| `name` | `string` | ✓ | package.json 中的组件名称 |
|
|
206
|
+
| `version` | `string` | ✓ | package.json 中的版本号 |
|
|
207
|
+
|
|
208
|
+
**返回值结构**:
|
|
209
|
+
|
|
210
|
+
```javascript
|
|
211
|
+
{
|
|
212
|
+
build: {
|
|
213
|
+
target: ['chrome94', 'edge94', 'firefox92'],
|
|
214
|
+
reportCompressedSize: false,
|
|
215
|
+
emptyOutDir: true,
|
|
216
|
+
outDir: '<组件名>_v<版本号>',
|
|
217
|
+
cssCodeSplit: true,
|
|
218
|
+
|
|
219
|
+
lib: {
|
|
220
|
+
entry: './index.js',
|
|
221
|
+
formats: ['umd', 'es'],
|
|
222
|
+
name: '<大写组件名>_v<版本号>',
|
|
223
|
+
fileName: (format) => format === 'es' ? 'es/index.js' : 'index.js'
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
rollupOptions: {
|
|
227
|
+
external: ['vue'],
|
|
228
|
+
output: {
|
|
229
|
+
globals: { vue: 'Vue' },
|
|
230
|
+
chunkFileNames: 'es/js/[name]-[hash].js',
|
|
231
|
+
assetFileNames: (assetInfo) => {
|
|
232
|
+
if (assetInfo.name?.endsWith('.css')) {
|
|
233
|
+
return 'es/style.css'
|
|
234
|
+
}
|
|
235
|
+
return 'es/assets/[name]-[hash][extname]'
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**使用示例**:
|
|
244
|
+
|
|
245
|
+
```javascript
|
|
246
|
+
import { getBaseConfig } from 'pangu-chart-cli';
|
|
247
|
+
|
|
248
|
+
const baseConfig = getBaseConfig({
|
|
249
|
+
name: 'my-chart',
|
|
250
|
+
version: '1.0.0'
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// 自定义扩展
|
|
254
|
+
export default {
|
|
255
|
+
...baseConfig,
|
|
256
|
+
plugins: [
|
|
257
|
+
/* 自定义插件列表 */
|
|
258
|
+
]
|
|
259
|
+
};
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### getPackageInfo(config)
|
|
263
|
+
|
|
264
|
+
获取打包信息(输出目录、UMD name、elementConfig)。
|
|
265
|
+
|
|
266
|
+
**参数**:
|
|
267
|
+
|
|
268
|
+
| 参数名 | 类型 | 必填 | 说明 |
|
|
269
|
+
| --------------- | ------------------- | ---- | --------------------------- |
|
|
270
|
+
| `name` | `string` | ✓ | package.json 中的组件名称 |
|
|
271
|
+
| `version` | `string` | ✓ | package.json 中的版本号 |
|
|
272
|
+
| `elementConfig` | `boolean \| object` | - | Element Plus namespace 配置 |
|
|
273
|
+
|
|
274
|
+
**返回值结构**:
|
|
275
|
+
|
|
276
|
+
```javascript
|
|
277
|
+
{
|
|
278
|
+
name: '<大写组件名>_v<版本号>', // UMD 全局变量名(首字母大写,版本号用_分隔)
|
|
279
|
+
outDir: '<组件名>_v<版本号>', // 输出目录名
|
|
280
|
+
elementConfig: <原始值> // 传入的 elementConfig 值
|
|
281
|
+
}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**说明**:
|
|
285
|
+
|
|
286
|
+
- `name` 格式:组件名首字母大写 + `_v` + 版本号(`.` 替换为 `_`)
|
|
287
|
+
- 例如:`my-chart` v1.0.0 → `My-chart_v1_0_0`
|
|
288
|
+
- `outDir` 格式:组件名 + `_v` + 版本号
|
|
289
|
+
- 例如:`my-chart` v1.0.0 → `my-chart_v1.0.0`
|
|
290
|
+
|
|
291
|
+
**使用示例**:
|
|
292
|
+
|
|
293
|
+
```javascript
|
|
294
|
+
import { getPackageInfo } from 'pangu-chart-cli';
|
|
295
|
+
|
|
296
|
+
const info = getPackageInfo({
|
|
297
|
+
name: 'my-chart',
|
|
298
|
+
version: '1.0.0'
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
console.log(info);
|
|
302
|
+
// 输出: { name: 'My-chart_v1_0_0', outDir: 'my-chart_v1.0.0', elementConfig: undefined }
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## elementConfig 配置详解
|
|
306
|
+
|
|
307
|
+
`elementConfig` 用于自定义 Element Plus CSS namespace,避免样式冲突。支持三种形态:
|
|
308
|
+
|
|
309
|
+
### 形态一:false / 不传
|
|
310
|
+
|
|
311
|
+
**含义**:不启用 namespace 功能。
|
|
312
|
+
|
|
313
|
+
**默认值**:无(不处理 Element Plus namespace)
|
|
314
|
+
|
|
315
|
+
**使用场景**:不需要隔离 Element Plus 样式,或组件库不依赖 Element Plus。
|
|
316
|
+
|
|
317
|
+
```javascript
|
|
318
|
+
getConfig({
|
|
319
|
+
name: 'my-chart',
|
|
320
|
+
version: '1.0.0',
|
|
321
|
+
elementConfig: false
|
|
322
|
+
});
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
### 形态二:true
|
|
326
|
+
|
|
327
|
+
**含义**:启用 namespace 功能,使用默认配置。
|
|
328
|
+
|
|
329
|
+
**默认值**:
|
|
330
|
+
|
|
331
|
+
| 参数 | 默认值 | 说明 |
|
|
332
|
+
| ----------- | --------------------------------------------------- | ---------------------------------- |
|
|
333
|
+
| `enable` | `true` | 启用功能 |
|
|
334
|
+
| `entryFile` | `'src/index.vue'` | Vue 入口文件路径(相对于项目根目录) |
|
|
335
|
+
| `configSrc` | `'element-plus/theme-chalk/src/mixins/config.scss'` | Element Plus SCSS config 文件路径 |
|
|
336
|
+
| `namespace` | `<大写组件名>` | 自动生成(组件名首字母大写) |
|
|
337
|
+
|
|
338
|
+
**使用场景**:快速启用 namespace,无需自定义参数。
|
|
339
|
+
|
|
340
|
+
```javascript
|
|
341
|
+
getConfig({
|
|
342
|
+
name: 'my-chart',
|
|
343
|
+
version: '1.0.0',
|
|
344
|
+
elementConfig: true
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// 实际配置:
|
|
348
|
+
// {
|
|
349
|
+
// enable: true,
|
|
350
|
+
// entryFile: 'src/index.vue',
|
|
351
|
+
// configSrc: 'element-plus/theme-chalk/src/mixins/config.scss',
|
|
352
|
+
// namespace: 'My-chart'
|
|
353
|
+
// }
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### 形态三:object(自定义配置)
|
|
357
|
+
|
|
358
|
+
**含义**:启用 namespace 功能,自定义参数。
|
|
359
|
+
|
|
360
|
+
**参数说明**:
|
|
361
|
+
|
|
362
|
+
| 参数 | 类型 | 必填 | 说明 |
|
|
363
|
+
| ----------- | --------- | ---- | ----------------------------------- |
|
|
364
|
+
| `enable` | `boolean` | - | 是否启用(默认:`true`) |
|
|
365
|
+
| `entryFile` | `string` | - | Vue 入口文件路径(支持相对/绝对路径) |
|
|
366
|
+
| `configSrc` | `string` | - | Element Plus SCSS config 文件路径 |
|
|
367
|
+
| `namespace` | `string` | - | 自定义 namespace 名称 |
|
|
368
|
+
|
|
369
|
+
**默认值**(未指定参数时):
|
|
370
|
+
|
|
371
|
+
- `enable`: `true`
|
|
372
|
+
- `entryFile`: `'src/index.vue'`
|
|
373
|
+
- `configSrc`: `'element-plus/theme-chalk/src/mixins/config.scss'`
|
|
374
|
+
- `namespace`: `<大写组件名>`(组件名首字母大写)
|
|
375
|
+
|
|
376
|
+
**使用场景**:需要自定义入口文件、namespace 名称等参数。
|
|
377
|
+
|
|
378
|
+
```javascript
|
|
379
|
+
getConfig({
|
|
380
|
+
name: 'my-chart',
|
|
381
|
+
version: '1.0.0',
|
|
382
|
+
elementConfig: {
|
|
383
|
+
enable: true,
|
|
384
|
+
entryFile: 'src/components/Chart.vue',
|
|
385
|
+
configSrc: 'element-plus/theme-chalk/src/mixins/config.scss',
|
|
386
|
+
namespace: 'MyCustomChart'
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### elementConfig 工作原理
|
|
392
|
+
|
|
393
|
+
启用 `elementConfig` 后,工具会执行以下操作:
|
|
394
|
+
|
|
395
|
+
1. **SCSS namespace 注入**:在 Vite 配置中添加 SCSS 预处理器配置,自动注入 `@forward` 语句修改 Element Plus namespace:
|
|
396
|
+
|
|
397
|
+
```scss
|
|
398
|
+
@forward 'element-plus/theme-chalk/src/mixins/config.scss' with (
|
|
399
|
+
$namespace: 'MyChart'
|
|
400
|
+
);
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
2. **Vue 模板包装**:通过 `elementNamespacePlugin` 在入口 Vue 文件的 `<template>` 中自动包装 `<el-config-provider namespace="MyChart">`:
|
|
404
|
+
|
|
405
|
+
```vue
|
|
406
|
+
<template>
|
|
407
|
+
<el-config-provider namespace="MyChart">
|
|
408
|
+
<!-- 原模板内容 -->
|
|
409
|
+
</el-config-provider>
|
|
410
|
+
</template>
|
|
411
|
+
|
|
412
|
+
<script setup>
|
|
413
|
+
import { ElConfigProvider } from 'element-plus';
|
|
414
|
+
</script>
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
3. **避免样式冲突**:所有 Element Plus 组件样式都会使用自定义 namespace,避免与其他 Element Plus 组件库产生样式冲突。
|
|
418
|
+
|
|
419
|
+
## 项目结构
|
|
420
|
+
|
|
421
|
+
```
|
|
422
|
+
pangu-chart-cli/
|
|
423
|
+
├── bin/
|
|
424
|
+
│ └── index.js # CLI 入口(指向 dist/index.js)
|
|
425
|
+
├── core/
|
|
426
|
+
│ ├── index.js # 命令注册(commander)
|
|
427
|
+
│ ├── dev/
|
|
428
|
+
│ │ └── index.js # dev 命令逻辑
|
|
429
|
+
│ └── build/
|
|
430
|
+
│ └── index.js # build 命令逻辑
|
|
431
|
+
├── viteConfig/
|
|
432
|
+
│ ├── index.js # getConfig API 实现
|
|
433
|
+
│ ├── base.js # getBaseConfig/getPackageInfo 实现
|
|
434
|
+
│ ├── default.js # 默认 Vite 配置模板
|
|
435
|
+
│ └── vite-plugin-element-namespace.js # Element namespace 插件
|
|
436
|
+
├── index.d.ts # TypeScript 类型定义
|
|
437
|
+
├── package.json
|
|
438
|
+
├── rollup.config.js # Rollup 打包配置
|
|
439
|
+
└── dist/ # 打包输出目录
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
## 开发指南
|
|
443
|
+
|
|
444
|
+
### 本地构建
|
|
445
|
+
|
|
446
|
+
使用 bun + rollup 进行本地构建:
|
|
447
|
+
|
|
448
|
+
```bash
|
|
449
|
+
pnpm build
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
构建流程:
|
|
453
|
+
|
|
454
|
+
1. `bun ./build/index.js` - 预处理
|
|
455
|
+
2. `rollup --config` - 打包生成 `dist/` 目录
|
|
456
|
+
|
|
457
|
+
### 发布流程
|
|
458
|
+
|
|
459
|
+
使用 `standard-version` 管理版本和生成 CHANGELOG:
|
|
460
|
+
|
|
461
|
+
```bash
|
|
462
|
+
# Patch 版本(1.0.0 -> 1.0.1)
|
|
463
|
+
pnpm release:patch
|
|
464
|
+
|
|
465
|
+
# Minor 版本(1.0.0 -> 1.1.0)
|
|
466
|
+
pnpm release:minor
|
|
467
|
+
|
|
468
|
+
# Major 版本(1.0.0 -> 2.0.0)
|
|
469
|
+
pnpm release:major
|
|
470
|
+
|
|
471
|
+
# Beta 版本(1.0.0 -> 1.0.1-beta.0)
|
|
472
|
+
pnpm release:beta
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
发布到 npm:
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
npm publish
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
### 依赖说明
|
|
482
|
+
|
|
483
|
+
**运行时依赖**:
|
|
484
|
+
|
|
485
|
+
- `commander` - CLI 框架
|
|
486
|
+
- `chalk` - 终端颜色输出
|
|
487
|
+
- `ora` - 终端加载动画
|
|
488
|
+
- `cross-spawn` - 跨平台进程执行
|
|
489
|
+
- `dayjs` - 时间处理
|
|
490
|
+
- `await-to-js` - 异步错误处理
|
|
491
|
+
- `yann-fs` - 文件系统工具
|
|
492
|
+
|
|
493
|
+
**开发依赖**:
|
|
494
|
+
|
|
495
|
+
- `rollup` - 打包工具
|
|
496
|
+
- `vite` - 构建核心(用户项目运行时依赖)
|
|
497
|
+
- `standard-version` - 版本管理
|
|
498
|
+
|
|
499
|
+
**用户项目需要安装**:
|
|
500
|
+
|
|
501
|
+
- `vite` - 构建工具
|
|
502
|
+
- `element-plus` - Element Plus 组件库(若使用 elementConfig)
|
|
503
|
+
- `@vitejs/plugin-vue` - Vue 插件
|
|
504
|
+
|
|
505
|
+
### 常见问题
|
|
506
|
+
|
|
507
|
+
**Q: Element Plus 未安装时使用 elementConfig 会报错吗?**
|
|
508
|
+
|
|
509
|
+
A: 会报错。使用 elementConfig 前需确保项目已安装 Element Plus:
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
npm install element-plus
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
**Q: 开发服务启动后局域网无法访问?**
|
|
516
|
+
|
|
517
|
+
A: 工具默认监听 `0.0.0.0`,局域网应可访问。请检查防火墙设置或使用 `--host` 参数指定 IP。
|
|
518
|
+
|
|
519
|
+
**Q: 打包输出目录命名规则?**
|
|
520
|
+
|
|
521
|
+
A: 输出目录格式为 `<组件名>_v<版本号>`,例如 `my-chart_v1.0.0`。
|
|
522
|
+
|
|
523
|
+
**Q: UMD 全局变量名命名规则?**
|
|
524
|
+
|
|
525
|
+
A: UMD name 格式为 `<大写组件名>_v<版本号>`(`.` 替换为 `_`),例如 `My-chart_v1_0_0`。
|
|
526
|
+
|
|
527
|
+
## License
|
|
528
|
+
|
|
529
|
+
MIT License
|
|
530
|
+
|
|
531
|
+
Copyright (c) 2024 Yann
|
|
532
|
+
|
|
533
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
534
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
535
|
+
in the Software without restriction, including without limitation the rights
|
|
536
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
537
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
538
|
+
furnished to do so, subject to the following conditions:
|
|
539
|
+
|
|
540
|
+
The above copyright notice and this permission notice shall be included in all
|
|
541
|
+
copies or substantial portions of the Software.
|
|
542
|
+
|
|
543
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
544
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
545
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
546
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
547
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
548
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
549
|
+
SOFTWARE.
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
"use strict";const t=require("yann-fs").default,i=require("fs").promises,e=require("path"),{getCurrentDir:s,runCommandAsync:a,initEnv:n}=require("../utils"),r=async(t=process.cwd())=>{const s=await i.readdir(t);for(const a of s){const s=e.join(t,a);(await i.stat(s)).isDirectory()?await r(s):(/^\._/.test(a)||/^\.DS/.test(a))&&await i.unlink(s)}};module.exports=async function(){const i=s();await n(i);const o=e.resolve(i,"vite.config.js"),c=e.resolve(i,"vite.config.ts");await t.exists(o)||await t.exists(c)?await a(["build"],{cwd:i}):await a(["build","-c",e.resolve(__dirname,"../viteConfig/default.js")],{cwd:i}),await r(i)};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
"use strict";const e=require("path"),s=require("yann-fs").default,{getCurrentDir:i,runDevSpawn:t,initEnv:a}=require("../utils"),n=["dev","--host","0.0.0.0"];module.exports=async function(){const o=i();await a(o);const r=e.resolve(o,"example"),c=e.resolve(r,"package.json");if(await s.exists(c)){const i=e.resolve(r,"vite.config.js"),a=e.resolve(r,"vite.config.ts");await s.exists(i)||await s.exists(a)||n.push("--config",e.resolve(__dirname,"../viteConfig/default.js")),await t(n,{cwd:r})}else{const i=e.resolve(o,"vite.config.js"),a=e.resolve(o,"vite.config.ts");await s.exists(i)||await s.exists(a)||n.push("--config",e.resolve(__dirname,"../viteConfig/default.js")),await t(n,{cwd:o})}};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
"use strict";const{program:e}=require("commander"),{version:r}=require("../package.json"),s=require("chalk");e.command("build").alias("b").description("打包").action((async()=>{await require("./build/index.js")()})),e.command("dev").alias("d").description("启动服务").action((async()=>{await require("./dev/index.js")()})),"-v"===process.argv[2]&&(console.log(r),process.exit(1)),e.version(r).parse(process.argv),process.on("uncaughtException",(function(e){console.log(s.bold.red("err:"),s.bold.red(e?.message||"异常错误!")),process.exit(1)}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
"use strict";const e=require("yann-fs").default,s=require("path"),n=require("dayjs"),o=()=>{let e=process.cwd();for(;e.includes("example");)e=s.resolve(e,"..");return e},r=(e,s=[],n={})=>new Promise((o=>{const r="win32"===process.platform,{enableSudo:t=!1,disableColor:a=!1,cwd:i=process.cwd(),stdio:c="inherit",shell:l=!1,..._}=n;let u=e,E=[...s];a&&r&&!E.includes("--no-color")&&E.push("--no-color"),!r&&t&&(u="sudo",E=[e,...E]);const T={cwd:i,stdio:c,shell:l,..._},p=require("cross-spawn")(u,E,T),d=[],R=[];p.stdout?.on("data",(e=>{d.push(e.toString())})),p.stderr?.on("data",(e=>{R.push(e.toString())})),p.on("error",(s=>{const n=s.message||"命令启动失败";let t="";t="ENOENT"===s.code?`未找到命令 "${e}",请先安装 ${e}`:"EACCES"===s.code?r?"权限不足!请以管理员身份运行终端":"权限不足!请确认当前用户有执行权限(可尝试 sudo)":`命令启动失败:${n}`,log.err(t),o({success:!1,stdout:"",stderr:n,status:null,message:t,error:s.stack||n})})),p.on("close",(s=>{const n=d.join("").trim(),t=R.join("").trim(),a=0===s;let i="";a?i=`命令执行成功:${e} ${E.join(" ")}`:(i=t.includes("not found")||t.includes("Package")?`未找到目标资源:${t.split("\n")[0]}`:t.includes("EAI_AGAIN")||t.includes("network")||t.includes("ENOTFOUND")?"网络错误:无法连接到服务或镜像源,请检查网络配置":t.includes("EACCES")?r?"权限不足!请以管理员身份运行终端":"权限不足!可尝试启用 sudo":`命令执行失败(退出码:${s}):${t||"无详细错误信息"}`,log.err(i)),o({success:a,stdout:n,stderr:t,status:s,message:i,error:a?null:t||`退出码:${s}`})}))}));const t=async n=>{const o=s.resolve(n,"public","base.json"),[r,t]=await e.readJson(o);if(r)throw new Error("执行失败,当前图表找不到 base.json 文件");const a=t.version,i=s.resolve(n,"package.json"),[c,l]=await e.readJson(i);if(c)throw new Error("执行失败,当前图表找不到 package.json 文件");const _=l.version,u=function(e,s){0===e.indexOf("v")&&(e=e.slice(1)),0===s.indexOf("v")&&(s=s.slice(1)),e=e.split("."),s=s.split(".");const n=Math.max(e.length,s.length);for(;e.length<n;)e.push("0");for(;s.length<n;)s.push("0");for(let o=0;o<n;o++){const n=parseInt(e[o]),r=parseInt(s[o]);if(n>r)return 1;if(n<r)return-1}return 0}(a,_);let E=a;return 1===u?(E=a,l.version=E,await e.outputJson(i,l,{spaces:2,EOL:"\n"})):-1===u&&(E=_,t.version=E,await e.outputJson(o,t,{spaces:2,EOL:"\n"})),{name:t.name,version:E}};module.exports={getCurrentDir:o,runCommandAsync:async(e,s)=>{await r("vite",e,s)},initEnv:async r=>{r=r||o(),await t(r);const a=s.resolve(r,"package.json"),[i,c]=await e.readJson(a);if(i)throw new Error("执行失败,当前图表找不到 package.json 文件");process.env.VITE_CURRENT_CHART_NAME=c.name,process.env.VITE_CURRENT_CHART_VERSION=c.version,process.env.VITE_CURRENT_CHART_AUTHOR=c.author,process.env.VITE_CURRENT_CHART_ELEMENT_CONFIG="elementConfig"in c?JSON.stringify(c.elementConfig):"false",process.env.VITE_BUILD_CHART_DIR=r,process.env.VITE_BUILD_CHART_TIME=n().format("YYYY-MM-DD HH:mm");const{VITE_CURRENT_BUILD_CHART_NAME_OUT_DIR:l,VITE_CURRENT_BUILD_CHART_NAME:_}=(()=>{const e=c.name.split("/").at(-1);return{VITE_CURRENT_BUILD_CHART_NAME:e.replace(/^\S/,(e=>e.toUpperCase()))+"_v"+c.version.replaceAll(".","_"),VITE_CURRENT_BUILD_CHART_NAME_OUT_DIR:`${e}_v${c.version}`}})();process.env.VITE_CURRENT_BUILD_CHART_NAME=_,process.env.VITE_CURRENT_BUILD_CHART_NAME_OUT_DIR=l},runDevSpawn:async(e,s)=>{await r("vite",e,s)},versionHandle:t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
import e from"@vitejs/plugin-vue";import n from"vite-plugin-compression";import r from"vite-plugin-banner";import{getBaseConfig as o,getPackageInfo as i}from"./index.js";import s from"./vite-plugin-element-namespace.js";import t from"node:path";import"@vue/compiler-sfc";const c=e=>e.replace(/\\/g,"/"),a=()=>{let e=process.cwd();for(;e.includes("example");)e=t.resolve(e,"..");return e},p=(e,n)=>{const r="object"==typeof e&&!Array.isArray(e),o=r&&"enable"in e?e.enable:!!e;if(!o)return{enable:o};const i="src/index.vue",s="element-plus/theme-chalk/src/mixins/config.scss";return{enable:o,entryFile:(e=>t.isAbsolute(e)?c(t.normalize(e)):c(t.resolve(a(),e)))(r&&e?.entryFile||i),configSrc:r&&e?.configSrc||s,namespace:r&&e?.namespace||n}},l=t=>{const c=o(t),{elementConfig:l,name:m}=i(t),u=a(),f=u?u+"/":"",{enable:v,entryFile:d,configSrc:g,namespace:b}=p(l,m),h=[],y={};return v&&(h.push(s({entryFile:d,namespace:b})),y.css={preprocessorOptions:{scss:{additionalData:`@forward '${g}' with (\n $namespace: '${b}'\n);`}}}),{define:{"process.env":process.env||{}},plugins:[...h,e({isProduction:!0}),n({ext:".gz",deleteOriginFile:!1}),r({outDir:f+c.build.outDir,content:`${t.name} v${t.version} ${t.author?"Author: "+t.author:""} Date: ${process.env.VITE_BUILD_CHART_TIME?process.env.VITE_BUILD_CHART_TIME:Date.now()}`})],server:{host:"0.0.0.0"},...y,build:c.build}};export{l as getConfig};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
import{defineConfig as e}from"vite";import{getConfig as i}from"./base.js";import"@vitejs/plugin-vue";import"vite-plugin-compression";import"vite-plugin-banner";import"./index.js";import"./vite-plugin-element-namespace.js";import"@vue/compiler-sfc";import"node:path";var o=e(i({name:process.env.VITE_CURRENT_CHART_NAME,version:process.env.VITE_CURRENT_CHART_VERSION,author:process.env.VITE_CURRENT_CHART_AUTHOR,elementConfig:JSON.parse(process.env.VITE_CURRENT_CHART_ELEMENT_CONFIG)}));export{o as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
export{getConfig}from"./base.js";export{getBaseConfig,getPackageInfo}from"./index.js";import"@vitejs/plugin-vue";import"vite-plugin-compression";import"vite-plugin-banner";import"./vite-plugin-element-namespace.js";import"@vue/compiler-sfc";import"node:path";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
const e=e=>{const s=e.name.split("/").at(-1);return{name:s.replace(/^\S/,(e=>e.toUpperCase()))+"_v"+e.version.replaceAll(".","_"),outDir:`${s}_v${e.version}`,elementConfig:e.elementConfig}},s=s=>{const{name:t,outDir:n}=e(s);return{build:{target:["chrome94","edge94","firefox92"],reportCompressedSize:!1,emptyOutDir:!0,outDir:n,cssCodeSplit:!0,lib:{entry:"./index.js",formats:["umd","es"],name:t,fileName:e=>"es"===e?"es/index.js":"index.js"},rollupOptions:{external:["vue"],output:{globals:{vue:"Vue"},chunkFileNames:"es/js/[name]-[hash].js",assetFileNames:e=>e.name?.endsWith(".css")?"es/style.css":"es/assets/[name]-[hash][extname]"}}}}};export{s as getBaseConfig,e as getPackageInfo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// pangu-chart-cli v1.0.0 by Jaxon
|
|
2
|
+
import{parse as e}from"@vue/compiler-sfc";function t(t){const{entryFile:n,namespace:r}=t;return n&&r?{name:"element-namespace-plugin",transform(t,i){if(i!==n)return t;try{const{descriptor:n}=e(t,{filename:i});if(!n.template)return t;const{newTemplateContent:s,templateModified:o}=function(e,t){const n=/<(el-config-provider|ElConfigProvider)([^>]*?)>/i,r=n.test(e);let i=e,s=!1;if(r){const r=e.match(n),o=r[1],c=r[2];if(!/namespace\s*=\s*["'].*?["']/i.test(c)){const r=c.trim(),l=r?`${r} namespace="${t}"`:`namespace="${t}"`;i=e.replace(n,`<${o} ${l}>`),s=!0}}else i=`\n <el-config-provider namespace="${t}">\n ${e}\n </el-config-provider>\n `.trim(),s=!0;return{newTemplateContent:i,templateModified:s}}(n.template.content,r);let c=t;return o&&(c=function(e,t){let n=function(e,t){const n=/(<script[\s\S]*?>[\s\S]*?<\/script>)/gi,r=[];let i=e;i=i.replace(n,(e=>(r.push(e),`__SCRIPT_PLACEHOLDER_${r.length-1}__`)));const s=/(<template>)([\s\S]*)(<\/template>)/,o=i.replace(s,`$1\n${t}\n$3`);let c=o;return r.forEach(((e,t)=>{c=c.replace(`__SCRIPT_PLACEHOLDER_${t}__`,e)})),c}(e,t);const r=/import\s+.*?(ElConfigProvider).*?\s+from\s+['"]element-plus['"]/i.test(n);if(r)return n;const i=/<script([^>]*?)>/i,s=n.match(i),o="import { ElConfigProvider } from 'element-plus';\n";if(s){const e=s.index+s[0].length;n=n.substring(0,e)+"\n"+o+n.substring(e)}else n+=`\n\n<script setup>\n${o}<\/script>`;return n}(c,s)),c}catch(e){return console.error("处理命名空间和导入时出错:",e),t}}}:(console.warn("请提供入口文件路径和目标命名空间"),{name:"element-namespace-plugin"})}export{t as default};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type {UserConfig} from "vite";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface ElementConfigObject {
|
|
5
|
+
enable?: boolean;
|
|
6
|
+
entryFile?: string;
|
|
7
|
+
configSrc?: string;
|
|
8
|
+
namespace?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BaseConfig{
|
|
12
|
+
name: string;
|
|
13
|
+
version: string;
|
|
14
|
+
author?: string;
|
|
15
|
+
elementConfig?: boolean | ElementConfigObject;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface Result {
|
|
19
|
+
build: {
|
|
20
|
+
reportCompressedSize: false,
|
|
21
|
+
emptyOutDir: true,
|
|
22
|
+
outDir:string,
|
|
23
|
+
cssCodeSplit: true,
|
|
24
|
+
lib: {
|
|
25
|
+
entry: string, // 设置入口文件
|
|
26
|
+
formats: string[],
|
|
27
|
+
name: string, // 起个名字,安装、引入用
|
|
28
|
+
fileName: ()=>string
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
rollupOptions: {
|
|
32
|
+
// 确保外部化处理那些你不想打包进库的依赖
|
|
33
|
+
external: string[],
|
|
34
|
+
output: {
|
|
35
|
+
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
|
|
36
|
+
globals: Record<string, string>
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare function getBaseConfig(config: BaseConfig): Result;
|
|
42
|
+
declare function getPackageInfo(config: {
|
|
43
|
+
name: string;
|
|
44
|
+
version: string;
|
|
45
|
+
elementConfig?: boolean | ElementConfigObject;
|
|
46
|
+
}) : {
|
|
47
|
+
name: string;
|
|
48
|
+
outDir: string;
|
|
49
|
+
elementConfig?: boolean | ElementConfigObject;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
declare function getConfig(config: BaseConfig):UserConfig
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pangu-chart-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "pangu-chart-cli",
|
|
5
|
+
"bin": {
|
|
6
|
+
"vcc": "bin/index.js",
|
|
7
|
+
"vis-chart-cli": "bin/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "bun ./build/index.js && rollup --config",
|
|
11
|
+
"release": "standard-version",
|
|
12
|
+
"release:patch": "standard-version --release-as patch",
|
|
13
|
+
"release:minor": "standard-version --release-as minor",
|
|
14
|
+
"release:major": "standard-version --release-as major",
|
|
15
|
+
"release:beta": "standard-version --prerelease beta"
|
|
16
|
+
},
|
|
17
|
+
"main": "./dist/viteConfig/entry.js",
|
|
18
|
+
"module": "./dist/viteConfig/entry.js",
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"await-to-js": "^3.0.0",
|
|
22
|
+
"chalk": "^4.1.2",
|
|
23
|
+
"commander": "^10.0.1",
|
|
24
|
+
"cross-spawn": "^7.0.6",
|
|
25
|
+
"dayjs": "^1.11.11",
|
|
26
|
+
"ora": "^5.4.1",
|
|
27
|
+
"yann-fs": "^1.6.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@rollup/plugin-commonjs": "^18.1.0",
|
|
31
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
32
|
+
"prettier": "^3.6.2",
|
|
33
|
+
"rollup": "^2.79.1",
|
|
34
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
35
|
+
"rollup-plugin-banner": "^0.2.1",
|
|
36
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
37
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
38
|
+
"standard-version": "^9.5.0"
|
|
39
|
+
},
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"registry": "https://registry.npmjs.org/"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"pangu-chart-cli",
|
|
45
|
+
"vcc",
|
|
46
|
+
"vis-chart-cli"
|
|
47
|
+
],
|
|
48
|
+
"author": "Jaxon",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"files": [
|
|
51
|
+
"dist",
|
|
52
|
+
"bin",
|
|
53
|
+
"index.d.ts"
|
|
54
|
+
]
|
|
55
|
+
}
|