From 96bdc313c7cb90eeb0f35b3b0a531ab4677fb146 Mon Sep 17 00:00:00 2001 From: fengyon Date: Thu, 6 Apr 2023 22:45:00 +0800 Subject: [PATCH] docs(readme.md contributing.md): rename readme.md and add english contributing.md --- CONTRIBUTING.md | 94 +++++++++++++++---------------- CONTRIBUTING.zh-CN.md | 76 +++++++++++++++++++++++++ README.en.md | 128 ------------------------------------------ README.md | 114 ++++++++++++++++++------------------- README.zh-CN.md | 128 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 308 insertions(+), 232 deletions(-) create mode 100644 CONTRIBUTING.zh-CN.md delete mode 100644 README.en.md create mode 100644 README.zh-CN.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5cea115..975884e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,76 +1,76 @@ -# 贡献指南 +# Contributing -很高兴你有意愿参与 TinyCLI 开源项目的贡献,参与贡献的形式有很多种,你可以根据自己的特长和兴趣选择其中的一个或多个: +We are glad that you are willing to contribute to the TinyCLI open source project. There are many forms of contribution, and you can choose one or more of them according to your strengths and interests: -- 报告[新缺陷](https://github.com/opentiny/tiny-cli/issues/new?template=bug-report.yml) -- 为[已有缺陷](https://github.com/opentiny/tiny-cli/labels/bug)提供更详细的信息,比如补充截图、提供更详细的复现步骤、提供最小可复现demo链接等 -- 提交 Pull requests 修复文档中的错别字或让文档更清晰和完善 -- 添加官方小助手微信 opentiny-official,加入技术交流群参与讨论 +- Report [new defect](https://github.com/opentiny/tiny-cli/issues/new?template=bug-report.yml) +- Provide more detailed information for [existing defects](https://github.com/opentiny/tiny-cli/labels/bug), such as supplementary screenshots, more detailed reproduction steps, minimum reproducible demo links, etc. +- Submit Pull requests to fix typos in the document or make the document clearer and better +- Add the official assistant WeChat `opentiny-official` and join the technical exchange group to participate in the discussion. -当你亲自使用 TinyCLI 组件库,并参与多次以上形式的贡献,对 TinyCLI 逐渐熟悉之后,可以尝试做一些更有挑战的事情,比如: +When you personally use the TinyCLI component library and participate in many of the above contributions, as you become familiar with TinyCLI, you can try to do something more challenging, such as: -- 修复缺陷,可以先从 [Good-first issue](https://github.com/opentiny/tiny-cli/labels/good%20first%20issue) 开始 -- 实现新特性 -- 完善单元测试 -- 翻译文档 -- 参与代码检视 +- Fix defects, you can start with [Good-first issue](https://github.com/opentiny/tiny-cli/labels/good%20first%20issue). +- Implement new features. +- Improve unit testing. +- Translate the document. +- Participate in code review. -## 提交 Issue +## Bug Reports -如果你在使用 TinyCLI 组件过程中遇到问题,欢迎给我们提交 Issue,提交 Issue 之前,请先仔细阅读相关的[官方文档](https://opentiny.design),确认这是一个缺陷还是尚未实现的功能。 +If you encounter problems in the process of using TinyCLI components, you are welcome to submit Issue to us. Before submitting Issue, please read the relevant [official documentation](https://opentiny.design) carefully to confirm whether this is a defect or an unimplemented function. -如果是一个缺陷,创建新 Issue 时选择 [Bug report](https://github.com/opentiny/tiny-cli/issues/new?template=bug-report.yml) 模板,标题遵循 `[toolkitName/pluginName/CliCore]缺陷简述` 的格式,比如:`[tiny-toolkit-xxx] xxx套件执行tiny start命令启动后提示xxx错误`。 +If it is a defect, select [Bug report](https://github.com/opentiny/tiny-cli/issues/new?template=bug-report.yml) template when creating a new Issue. The title follows the format of `[toolkitName/pluginName/CliCore] defect description`. For example: `[tiny-toolkit-xxx] a xxx error was occurred after the 'tiny start' command was run by the xxx toolkit`. -报告缺陷的 Issue 主要需要填写以下信息: -- tiny-cli 和 node 的版本号 -- 缺陷的表现,可截图辅助说明,如果有报错可贴上报错信息 -- 缺陷的复现步骤,最好能提供一个最小可复现 demo 链接 +Issue that reports defects mainly needs to fill in the following information: +- Version numbers of `tiny` and `node`. +- The performance of the defect can be illustrated by screenshot, and if there is an error, the error message can be posted. +- Defect reproduction step, preferably with a minimum reproducible demo link. -如果是一个新特性,则选择 [Feature request](https://github.com/opentiny/tiny-cli/issues/new?template=feature-request.yml) 模板,标题遵循 `[toolkitName/pluginName/CliCore]新特性简述` 的格式,比如:`[CliCore] 新增switch命令支持切换NPM源功能`。 +If it is a new feature, select [Feature request](https://github.com/opentiny/tiny-cli/issues/new?template=feature-request.yml) template. The title follows the format of `[toolkitName/pluginName/CliCore] new feature description`. For example: `[CliCore] added the switch command to support switching of the NPM source`. -新特性的 Issue 主要需要填写以下信息: -- 该特性主要解决用户的什么问题 -- 该特性的 api 是什么样的 +The following information is required for the Issue of the new feature: +- What problems does this feature mainly solve for users? +- What is the api of this feature? -## 提交 PR +## Pull Requests -提交 PR 之前,请先确保你提交的内容是符合 TinyCLI 整体规划的,一般已经标记为 [bug](https://github.com/opentiny/tiny-cli/labels/bug) 的 Issue 是鼓励提交 PR 的,如果你不是很确定,可以创建一个 [Discussion](https://github.com/opentiny/tiny-cli/discussions) 进行讨论。 +Before submitting pull request, please make sure that your submission is in line with the overall plan of TinyVue. Generally, issues that marked as [bug](https://github.com/opentiny/tiny-cli/labels/bug) are encouraged to submit pull requests. If you are not sure, you can create a [Discussion](https://github.com/opentiny/tiny-cli/discussions) for discussion. -本地启动步骤: +Local startup steps: -- 点击 [TinyCLI](https://github.com/opentiny/tiny-cli) 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库 -- Clone 个人仓库到本地 -- 在 Tiny CLI 根目录下运行 npm init, 安装依赖 -- 运行 npm run dev,启动本地代码编译开发 +- Click the Fork button in the upper right corner of the [TinyCLI](https://github.com/opentiny/tiny-cli) code repository to Fork the upstream repository to the personal repository. +- Clone personal repository to local. +- Run `npm init` under the TinyCLI root directory to install node dependencies. +- Run `npm run dev` to launch the local website for develop. ```shell -# username 为用户名,执行前请替换 +# You need to replace username with your own user name git clone git@github.com:username/tiny-cli.git cd tiny-cli git remote add upstream git@github.com:opentiny/tiny-cli.git npm i -# 启动项目 +# Launch npm run dev ``` -提交 PR 的步骤: +To submit a PR: -- 创建新分支 `git checkout -b username/feature1`,分支名字建议为 `username/feat-xxx` / `username/fix-xxx` -- 本地编码 -- 遵循 Commit Message Format 规范进行提交,不符合提交规范的 PR 将不会被合并 -- 提交到远程仓库:git push origin branchName -- (可选)同步上游仓库 dev 分支最新代码:git pull upstream dev -- 打开 TinyCLI 代码仓库的 [Pull requests](https://github.com/opentiny/tiny-cli/pulls) 链接,点击 New pull request 按钮提交 PR -- 项目 Committer 进行 Code Review,并提出意见 -- PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR -- 项目管理员合并 PR +- Create a new branch `git checkout -b username/feature1`. The name of the branch should be `username/feat-xxx` / `username/fix-xxx`. +- Local coding. +- Submit according to [Commit Message Format](https://www.conventionalcommits.org/zh-hans/v1.0.0/) specification. PR that do not conform to the submission specification will not be merged. +- Submit to remote repository: `git push origin branchName`. +- (Optional) Synchronize upstream repository dev branch latest code: `git pull upstream dev`. +- Open the [Pull requests](https://github.com/opentiny/tiny-cli/pulls) link of the TinyCLI code repository and click the New pull request button to submit the PR. +- Project Committer conducts Code Review and makes comments. +- The PR author adjusts the code according to the opinion. Please note that when a branch initiates PR, the subsequent commit will be synchronized automatically, and there is no need to resubmit the PR. +- Project administrator merges PR. -贡献流程结束,感谢你的贡献! +The contribution process is over, thank you for your contribution! -## 加入开源社区 +## Join OpenTiny community -如果你对我们的开源项目感兴趣,欢迎通过以下方式加入我们的开源社区。 +If you are interested in our open source project, you are welcome to join our open source community in the following ways. -- 添加官方小助手微信:opentiny-official,加入我们的技术交流群 -- 加入邮件列表:opentiny@googlegroups.com +- Add official assistant WeChat: opentiny-official to join our technical exchange group. +- Add to the mailing list: opentiny@googlegroups.com diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md new file mode 100644 index 00000000..e5cea115 --- /dev/null +++ b/CONTRIBUTING.zh-CN.md @@ -0,0 +1,76 @@ +# 贡献指南 + +很高兴你有意愿参与 TinyCLI 开源项目的贡献,参与贡献的形式有很多种,你可以根据自己的特长和兴趣选择其中的一个或多个: + +- 报告[新缺陷](https://github.com/opentiny/tiny-cli/issues/new?template=bug-report.yml) +- 为[已有缺陷](https://github.com/opentiny/tiny-cli/labels/bug)提供更详细的信息,比如补充截图、提供更详细的复现步骤、提供最小可复现demo链接等 +- 提交 Pull requests 修复文档中的错别字或让文档更清晰和完善 +- 添加官方小助手微信 opentiny-official,加入技术交流群参与讨论 + +当你亲自使用 TinyCLI 组件库,并参与多次以上形式的贡献,对 TinyCLI 逐渐熟悉之后,可以尝试做一些更有挑战的事情,比如: + +- 修复缺陷,可以先从 [Good-first issue](https://github.com/opentiny/tiny-cli/labels/good%20first%20issue) 开始 +- 实现新特性 +- 完善单元测试 +- 翻译文档 +- 参与代码检视 + +## 提交 Issue + +如果你在使用 TinyCLI 组件过程中遇到问题,欢迎给我们提交 Issue,提交 Issue 之前,请先仔细阅读相关的[官方文档](https://opentiny.design),确认这是一个缺陷还是尚未实现的功能。 + +如果是一个缺陷,创建新 Issue 时选择 [Bug report](https://github.com/opentiny/tiny-cli/issues/new?template=bug-report.yml) 模板,标题遵循 `[toolkitName/pluginName/CliCore]缺陷简述` 的格式,比如:`[tiny-toolkit-xxx] xxx套件执行tiny start命令启动后提示xxx错误`。 + +报告缺陷的 Issue 主要需要填写以下信息: +- tiny-cli 和 node 的版本号 +- 缺陷的表现,可截图辅助说明,如果有报错可贴上报错信息 +- 缺陷的复现步骤,最好能提供一个最小可复现 demo 链接 + +如果是一个新特性,则选择 [Feature request](https://github.com/opentiny/tiny-cli/issues/new?template=feature-request.yml) 模板,标题遵循 `[toolkitName/pluginName/CliCore]新特性简述` 的格式,比如:`[CliCore] 新增switch命令支持切换NPM源功能`。 + +新特性的 Issue 主要需要填写以下信息: +- 该特性主要解决用户的什么问题 +- 该特性的 api 是什么样的 + +## 提交 PR + +提交 PR 之前,请先确保你提交的内容是符合 TinyCLI 整体规划的,一般已经标记为 [bug](https://github.com/opentiny/tiny-cli/labels/bug) 的 Issue 是鼓励提交 PR 的,如果你不是很确定,可以创建一个 [Discussion](https://github.com/opentiny/tiny-cli/discussions) 进行讨论。 + +本地启动步骤: + +- 点击 [TinyCLI](https://github.com/opentiny/tiny-cli) 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库 +- Clone 个人仓库到本地 +- 在 Tiny CLI 根目录下运行 npm init, 安装依赖 +- 运行 npm run dev,启动本地代码编译开发 + +```shell +# username 为用户名,执行前请替换 +git clone git@github.com:username/tiny-cli.git +cd tiny-cli +git remote add upstream git@github.com:opentiny/tiny-cli.git +npm i + +# 启动项目 +npm run dev +``` + +提交 PR 的步骤: + +- 创建新分支 `git checkout -b username/feature1`,分支名字建议为 `username/feat-xxx` / `username/fix-xxx` +- 本地编码 +- 遵循 Commit Message Format 规范进行提交,不符合提交规范的 PR 将不会被合并 +- 提交到远程仓库:git push origin branchName +- (可选)同步上游仓库 dev 分支最新代码:git pull upstream dev +- 打开 TinyCLI 代码仓库的 [Pull requests](https://github.com/opentiny/tiny-cli/pulls) 链接,点击 New pull request 按钮提交 PR +- 项目 Committer 进行 Code Review,并提出意见 +- PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR +- 项目管理员合并 PR + +贡献流程结束,感谢你的贡献! + +## 加入开源社区 + +如果你对我们的开源项目感兴趣,欢迎通过以下方式加入我们的开源社区。 + +- 添加官方小助手微信:opentiny-official,加入我们的技术交流群 +- 加入邮件列表:opentiny@googlegroups.com diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7f6e4bb4..00000000 --- a/README.en.md +++ /dev/null @@ -1,128 +0,0 @@ -# Tiny CLI - -> Tiny CLI is a powerful front-end engineering command line tool. - -[Tiny CLI Website](https://opentiny.design/tiny-cli/home) - - -## Installation - -Open git bash, zsh, and other command-line tools, type the following command, and press Enter: - -```bash -npm i @opentiny/cli npminstall -g -``` - -Wait for a while. After the installation is complete, run `$tiny -v` on the terminal. If the version information is displayed, the installation is successful. - -Note: Tiny-cli depends on the nodejs (12.x or later) and npm environments. Before installing Tiny CLI, ensure that nodejs and npm have been installed on the local host. - -## Docs - -* [CLI Tool Design Document](docs/tool-design.md) -* User Documentation - * [Introduction to tiny-cli](docs/use-summary.md) - * [Install tiny-cli](docs/use-install.md) - * [Basic commands of tiny-cli](docs/use-cli.md) - * [Using the tiny-cli toolkit](docs/use-toolkit.md) - * [Using the tiny-cli plugin](docs/use-plugin.md) - * [tiny-cli configuration file](docs/use-config.md) -* Developer Documentation - * [tiny-cli API](docs/api.md) - * [Toolkit development guide](docs/dev-toolkit.md) - * [Plugin development guide](docs/dev-plugin.md) - -## Usage - -You can enter `$tiny -h` on the terminal to view the Tiny Help. - -```bash - tiny help info: $ tiny [command] [options] - - $ tiny The help information is displayed. If a toolkit is used in the directory, the help information of the toolkit is also displayed. - $ tiny init [toolkitName] Initialization Kit - $ tiny update [name] Update module - $ tiny list [type] Plug-in list - $ tiny i Installing the NPM Module - $ tiny clear Clear the local cache of Tiny. - $ tiny help Displays suite help information. - $ tiny [name] Other Invoking Plug-in Commands - - Options: - - -h, --help Displays help information. - -v, --version Show Tiny Version - - - Hint: - Toolkits - To view help information about toolkits used in your project, execute this command in the project root directory. - Plugins - To view the help information about the plugin, run the tiny [name] help command, for example, tiny git help. -``` - -### Quick start - -The `@opentiny/tiny-toolkit-dev` toolkit is used as an example to describe the development process. - - -1. Initializing a project - - ```bash - # Create and enter the project folder - $ mkdir my-project && cd $_ - - # Initializing the Dev Development Environment - $ tiny init dev - ``` - -3. Enable the local environment. - - ```bash - # Enabling the Dev Development Environment - $ tiny start - ``` - -4. Compile and package the project. - - ```bash - $ tiny build - ``` - -## ChangeLog - -[CHANGELOG.md](CHANGELOG.md) - -## Support - -If problems occur during development and use, create issues in the code repository. - -## Development Document - -### Prerequisites - -* Ensure that lerna has been installed: `npm install --global lerna` -* Ensure that the node version is v12.x or later. - -### Local Development and Debugging Commands - -Initialize:`npm run init` -Development:`npm run dev` -Build:`npm run build` -Verify: `npm run link` - -### Build Process - -Run the `npm run build` command in the root directory. The lib and dist directories are packed. - - -## Participating in contributions - -If you are interested in our open source project, please join us! - -Please read [Contribution Guide] (CONTRIBUTING.md) before participating in a contribution. - -- Add the official assistant WeChat opentiny and join the technical exchange group. -- Join the mailing list opentiny@googlegroups.com - -## Open source protocol - -[MIT](LICENSE) \ No newline at end of file diff --git a/README.md b/README.md index 4619ea21..d5609c8e 100644 --- a/README.md +++ b/README.md @@ -1,87 +1,87 @@ # Tiny CLI -> Tiny CLI是前端工程化命令行工具 +> Tiny CLI is a powerful front-end engineering command line tool. -[Tiny CLI官网](https://opentiny.design/tiny-cli/home) +[Tiny CLI Website](https://opentiny.design/tiny-cli/home) ## Installation -打开git bash、zsh等命令行工具,输入如下命令后回车: +Open git bash, zsh, and other command-line tools, type the following command, and press Enter: ```bash -npm i @opentiny/cli npminstall@3 -g +npm i @opentiny/cli npminstall -g ``` -等待片刻,待安装完成之后在终端执行 `$ tiny -v`,正常返回版本信息,表示安装成功。 +Wait for a while. After the installation is complete, run `$tiny -v` on the terminal. If the version information is displayed, the installation is successful. -注意:tiny-cli 依赖 nodejs(12.x以上) 、 npm 环境,在安装tiny时,请确保本机已安装了nodejs和npm +Note: Tiny-cli depends on the nodejs (12.x or later) and npm environments. Before installing Tiny CLI, ensure that nodejs and npm have been installed on the local host. ## Docs -* [CLI工具设计文档](docs/tool-design.md) -* 使用者文档 - * [tiny-cli介绍](docs/use-summary.md) - * [安装tiny-cli](docs/use-install.md) - * [tiny-cli基础命令详解](docs/use-cli.md) - * [使用tiny-cli套件](docs/use-toolkit.md) - * [使用tiny-cli插件](docs/use-plugin.md) - * [tiny-cli配置文件](docs/use-config.md) -* 开发者文档 +* [CLI Tool Design Document](docs/tool-design.md) +* User Documentation + * [Introduction to tiny-cli](docs/use-summary.md) + * [Install tiny-cli](docs/use-install.md) + * [Basic commands of tiny-cli](docs/use-cli.md) + * [Using the tiny-cli toolkit](docs/use-toolkit.md) + * [Using the tiny-cli plugin](docs/use-plugin.md) + * [tiny-cli configuration file](docs/use-config.md) +* Developer Documentation * [tiny-cli API](docs/api.md) - * [套件开发指南](docs/dev-toolkit.md) - * [插件开发指南](docs/dev-plugin.md) + * [Toolkit development guide](docs/dev-toolkit.md) + * [Plugin development guide](docs/dev-plugin.md) ## Usage -可在终端输入`$ tiny -h` 查看tiny使用帮助 +You can enter `$tiny -h` on the terminal to view the Tiny Help. ```bash - tiny 使用帮助: $ tiny [command] [options] + tiny help info: $ tiny [command] [options] - $ tiny 显示tiny帮助信息,若目录下有使用的套件,则会同时显示套件的帮助信息 - $ tiny init [toolkitName] 初始化套件 - $ tiny update [name] 更新tiny模块 - $ tiny list [type] 插件列表 - $ tiny i 安装npm模块 - $ tiny clear 清空 tiny 的本地缓存 - $ tiny help 显示套件帮助信息 - $ tiny [name] 其他调用插件命令 + $ tiny The help information is displayed. If a toolkit is used in the directory, the help information of the toolkit is also displayed. + $ tiny init [toolkitName] Initialization Kit + $ tiny update [name] Update module + $ tiny list [type] Plug-in list + $ tiny i Installing the NPM Module + $ tiny clear Clear the local cache of Tiny. + $ tiny help Displays suite help information. + $ tiny [name] Other Invoking Plug-in Commands Options: - -h, --help 显示tiny帮助信息 - -v, --version 显示tiny版本 + -h, --help Displays help information. + -v, --version Show Tiny Version - 提示: - 套件 - 若想查看项目中所使用的套件帮助信息,请在项目根目录执行该命令. - 插件 - 若想查看插件的帮助信息,请使用 tiny [name] help 命令, eg : tiny git help + Hint: + Toolkits - To view help information about toolkits used in your project, execute this command in the project root directory. + Plugins - To view the help information about the plugin, run the tiny [name] help command, for example, tiny git help. ``` ### Quick start -以 `@opentiny/tiny-toolkit-dev` 套件为例,讲解开发流程。 +The `@opentiny/tiny-toolkit-dev` toolkit is used as an example to describe the development process. -1. 初始化项目 +1. Initializing a project ```bash - # 创建并进入项目文件夹 + # Create and enter the project folder $ mkdir my-project && cd $_ - # 初始化dev的开发环境 + # Initializing the Dev Development Environment $ tiny init dev ``` -3. 开启本地环境 +3. Enable the local environment. ```bash - # 开启dev的开发环境 + # Enabling the Dev Development Environment $ tiny start ``` -4. 项目编译及打包 +4. Compile and package the project. ```bash $ tiny build @@ -93,36 +93,36 @@ npm i @opentiny/cli npminstall@3 -g ## Support -开发及使用过程中的问题,可以在代码仓库新建issue +If problems occur during development and use, create issues in the code repository. -## 开发文档 +## Development Document -### 前置条件 +### Prerequisites -* 确保已安装lerna,未安装可执行命令: `npm install --global lerna` -* 确保node版本在v12.x及以上 +* Ensure that lerna has been installed: `npm install --global lerna` +* Ensure that the node version is v12.x or later. -### 本地开发调试命令 +### Local Development and Debugging Commands -首次:`npm run init` -开发:`npm run dev` -构建:`npm run build` -本地验证: `npm run link` +Initialize:`npm run init` +Development:`npm run dev` +Build:`npm run build` +Verify: `npm run link` -### 构建流程 +### Build Process -根目录执行`npm run build`即可,会打包出lib目录和dist目录。 +Run the `npm run build` command in the root directory. The lib and dist directories are packed. -## 参与贡献 +## Participating in contributions -如果你对我们的开源项目感兴趣,欢迎加入我们! +If you are interested in our open source project, please join us! -参与贡献之前请先阅读[贡献指南](CONTRIBUTING.md)。 +Please read [Contribution Guide] (CONTRIBUTING.md) before participating in a contribution. -- 添加官方小助手微信 opentiny,加入技术交流群 -- 加入邮件列表 opentiny@googlegroups.com +- Add the official assistant WeChat `opentiny-official` and join the technical exchange group. +- Join the mailing list opentiny@googlegroups.com -## 开源协议 +## Open source protocol [MIT](LICENSE) \ No newline at end of file diff --git a/README.zh-CN.md b/README.zh-CN.md new file mode 100644 index 00000000..99ad0f3a --- /dev/null +++ b/README.zh-CN.md @@ -0,0 +1,128 @@ +# Tiny CLI + +> Tiny CLI是前端工程化命令行工具 + +[Tiny CLI官网](https://opentiny.design/tiny-cli/home) + + +## Installation + +打开git bash、zsh等命令行工具,输入如下命令后回车: + +```bash +npm i @opentiny/cli npminstall@3 -g +``` + +等待片刻,待安装完成之后在终端执行 `$ tiny -v`,正常返回版本信息,表示安装成功。 + +注意:tiny-cli 依赖 nodejs(12.x以上) 、 npm 环境,在安装tiny时,请确保本机已安装了nodejs和npm + +## Docs + +* [CLI工具设计文档](docs/tool-design.md) +* 使用者文档 + * [tiny-cli介绍](docs/use-summary.md) + * [安装tiny-cli](docs/use-install.md) + * [tiny-cli基础命令详解](docs/use-cli.md) + * [使用tiny-cli套件](docs/use-toolkit.md) + * [使用tiny-cli插件](docs/use-plugin.md) + * [tiny-cli配置文件](docs/use-config.md) +* 开发者文档 + * [tiny-cli API](docs/api.md) + * [套件开发指南](docs/dev-toolkit.md) + * [插件开发指南](docs/dev-plugin.md) + +## Usage + +可在终端输入`$ tiny -h` 查看tiny使用帮助 + +```bash + tiny 使用帮助: $ tiny [command] [options] + + $ tiny 显示tiny帮助信息,若目录下有使用的套件,则会同时显示套件的帮助信息 + $ tiny init [toolkitName] 初始化套件 + $ tiny update [name] 更新tiny模块 + $ tiny list [type] 插件列表 + $ tiny i 安装npm模块 + $ tiny clear 清空 tiny 的本地缓存 + $ tiny help 显示套件帮助信息 + $ tiny [name] 其他调用插件命令 + + Options: + + -h, --help 显示tiny帮助信息 + -v, --version 显示tiny版本 + + + 提示: + 套件 - 若想查看项目中所使用的套件帮助信息,请在项目根目录执行该命令. + 插件 - 若想查看插件的帮助信息,请使用 tiny [name] help 命令, eg : tiny git help +``` + +### Quick start + +以 `@opentiny/tiny-toolkit-dev` 套件为例,讲解开发流程。 + + +1. 初始化项目 + + ```bash + # 创建并进入项目文件夹 + $ mkdir my-project && cd $_ + + # 初始化dev的开发环境 + $ tiny init dev + ``` + +3. 开启本地环境 + + ```bash + # 开启dev的开发环境 + $ tiny start + ``` + +4. 项目编译及打包 + + ```bash + $ tiny build + ``` + +## ChangeLog + +[CHANGELOG.md](CHANGELOG.md) + +## Support + +开发及使用过程中的问题,可以在代码仓库新建issue + +## 开发文档 + +### 前置条件 + +* 确保已安装lerna,未安装可执行命令: `npm install --global lerna` +* 确保node版本在v12.x及以上 + +### 本地开发调试命令 + +首次:`npm run init` +开发:`npm run dev` +构建:`npm run build` +本地验证: `npm run link` + +### 构建流程 + +根目录执行`npm run build`即可,会打包出lib目录和dist目录。 + + +## 参与贡献 + +如果你对我们的开源项目感兴趣,欢迎加入我们! + +参与贡献之前请先阅读[贡献指南](CONTRIBUTING.md)。 + +- 添加官方小助手微信 opentiny-official,加入技术交流群 +- 加入邮件列表 opentiny@googlegroups.com + +## 开源协议 + +[MIT](LICENSE) \ No newline at end of file