@done-coding/cli-utils 0.7.8 → 0.8.1

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
@@ -1,7 +1,109 @@
1
1
  # @done-coding/cli-utils
2
2
 
3
- cli utils
3
+ CLI 通用工具库 - 为 done-coding CLI 生态系统提供基础工具函数
4
4
 
5
- ## 使用
5
+ [![npm version](https://badge.fury.io/js/@done-coding%2Fcli-utils.svg)](https://www.npmjs.com/package/@done-coding/cli-utils)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
7
 
8
+ ## 安装
9
+
10
+ ```bash
7
11
  npm install @done-coding/cli-utils
12
+ # 或
13
+ pnpm add @done-coding/cli-utils
14
+ ```
15
+
16
+ ## 快速开始
17
+
18
+ ```bash
19
+ # 作为依赖库使用,不提供独立的 CLI 命令
20
+ ```
21
+
22
+ ## 功能特性
23
+
24
+ - ✅ **基础工具**: 提供通用的 CLI 工具函数
25
+ - 🔧 **类型定义**: 统一的 TypeScript 类型定义
26
+ - 📝 **配置处理**: 配置文件读取和处理工具
27
+ - 🎨 **命令行美化**: 基于 chalk 的命令行输出美化
28
+ - 🔄 **数据处理**: 基于 lodash 的数据操作工具
29
+
30
+ ## API 文档
31
+
32
+ 本包是一个工具库,不提供独立的 CLI 命令,主要为其他 done-coding CLI 包提供基础功能。
33
+
34
+ ### 主要依赖
35
+
36
+ - **chalk**: 命令行输出美化
37
+ - **json5**: JSON5 格式支持
38
+ - **lodash**: 数据操作工具函数
39
+ - **prompts**: 交互式命令行提示
40
+ - **semver**: 版本号处理
41
+ - **uuid**: UUID 生成
42
+ - **yargs**: 命令行参数解析
43
+
44
+ ## 使用示例
45
+
46
+ ### 作为依赖使用
47
+
48
+ ```javascript
49
+ import { /* 具体导出内容 */ } from '@done-coding/cli-utils';
50
+
51
+ // 具体使用方法需要查看包的导出内容
52
+ ```
53
+
54
+ ## 编程接口
55
+
56
+ 本包提供了编程接口,具体的导出内容请查看包的类型定义文件。
57
+
58
+ ## 包依赖关系
59
+
60
+ ### 被其他包依赖
61
+
62
+ `@done-coding/cli-utils` 是基础工具库,被以下包依赖:
63
+
64
+ - `@done-coding/cli` - 主 CLI 工具
65
+ - `@done-coding/cli-component` - 组件生成工具
66
+ - `@done-coding/cli-config` - 工程配置工具
67
+ - `@done-coding/cli-extract` - 信息提取工具
68
+ - `@done-coding/cli-git` - Git 操作工具
69
+ - `@done-coding/cli-inject` - 信息注入工具
70
+ - `@done-coding/cli-publish` - 项目发布工具
71
+ - `@done-coding/cli-template` - 模板处理工具
72
+ - `create-done-coding` - 项目创建工具
73
+
74
+ ## 贡献指南
75
+
76
+ 我们欢迎贡献!请遵循以下步骤:
77
+
78
+ 1. Fork 本仓库
79
+ 2. 创建功能分支:`git checkout -b feature/amazing-feature`
80
+ 3. 提交更改:`git commit -m "feat: add amazing feature"`
81
+ 4. 推送分支:`git push origin feature/amazing-feature`
82
+ 5. 创建 Pull Request
83
+
84
+ ### 开发环境设置
85
+
86
+ ```bash
87
+ # 克隆仓库
88
+ git clone https://gitee.com/done-coding/done-coding-cli.git
89
+ cd done-coding-cli/packages/utils
90
+
91
+ # 安装依赖
92
+ pnpm install
93
+
94
+ # 开发模式
95
+ pnpm dev
96
+
97
+ # 构建
98
+ pnpm build
99
+ ```
100
+
101
+ ## 许可证
102
+
103
+ MIT © [JustSoSu](https://gitee.com/done-coding)
104
+
105
+ ## 相关链接
106
+
107
+ - [主 CLI 工具](https://www.npmjs.com/package/@done-coding/cli)
108
+ - [Gitee 仓库](https://gitee.com/done-coding/done-coding-cli)
109
+ - [更新日志](./CHANGELOG.md)