# yangtze-cli

> ## 为什么要使用 yangtze-cli？

Latest version **0.1.3** (published 2022-08-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install yangtze-cli
pnpm add yangtze-cli
yarn add yangtze-cli
bun add yangtze-cli
```

Provides the command `yangtze-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2022-08-11 |
| First published | 2022-07-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | ppmia |
| Keywords | yangtze-cli, yangtze, cli, changjiang |

## Links

- npm: https://www.npmjs.com/package/yangtze-cli
- npm.io page: https://npm.io/package/yangtze-cli

## Dependencies (7)

- [ora](https://npm.io/package/ora.md) ^5.0.0
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [chalk](https://npm.io/package/chalk.md) ^4.0.1
- [figlet](https://npm.io/package/figlet.md) ^1.5.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [inquirer](https://npm.io/package/inquirer.md) ^6.2.2
- [commander](https://npm.io/package/commander.md) ^9.3.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2022-08-11
- 0.1.2 — 2022-07-19
- 0.1.1 — 2022-07-19
- 0.1.0 — 2022-07-18

## README

# yangtze-cli

## 为什么要使用 yangtze-cli？

🤩 项目交付，唯快不破 🎯

## 功能

快速上手搭建前端项目，提供多类项目模版，有效实现快速迭代、规范开发。
提供项目模版包括：

- 🖥️ PC 端项目模版（React/Umi/Typrscript）
- 📱 移动端项目模版（Vue/uni-app）
- （...不断更新中...）

## 如何使用

### 安装

```bash
$ npm i -g yangtze-cli
$ yangtze-cli -v
```

```bash
$ yarn global add yangtze-cli
$ yangtze-cli -v
```

### 创建项目

进入所需存放项目文件夹的目录，执行以下命令，将在该文件夹下建立命令行中所设项目名称的项目文件夹。

```bash
$ cd ～/location/of/project/folder
$ yangtze-cli create <project-name> [options] // 参数可选：-f 或 --force 强制创建
```

### 安装依赖

```bash
$ cd ～/location/of/project/folder/<project-name>
$ npm i
```

```bash
$ cd ～/location/of/project/folder/<project-name>
$ yarn
```

### 启动项目

web 端常用启动方法：

```bash
$ cd ～/location/of/project/folder/<project-name>
$ npm run start
```

```bash
$ cd ～/location/of/project/folder/<project-name>
$ yarn start
```

其他模版项目启动方式可参照项目模版文件夹下的 package.json 文件命令配置。

### 代码提交

模版下载完成后已自动初始化 git 仓库，首次提交代码需在配置 git 远程仓库后进行。

```bash
$ git remote add origin <git-url>
$ git add .
$ git commit -m "initial commit"
$ git push origin master
```

### 其他

1. 查看帮助信息

```bash
$ yangtze-cli -h
```

2. 所选模版项目的 **_开发规范_**、**_注意事项_**、**_目录结构_** 等参照对应模版项目说明。

## 持续开发

关于模版项目的持续开发，请注意如下规范：

1. 模版项目集中放置于长江代码库统一项目目录下 ([<u>长江大数据代码库</u>](http://60.173.17.240:9980/cjgydsj/architecture/front-end-common/basic-templates))
2. 脚手架中供选择的模版名称即模版项目名称，用于自动配置模版下载地址，请勿随意修改
3. 模版项目不同版本需拉取不同分支进行管理，分支名称即版本号，default 版本即默认最新版本（ default 版本对应 master 分支），例：v1.0.0
4. 保持项目 master 分支为最新版本

## 版本日志

| 版本号 | 更新日期   | 更新内容                           |
| ------ | ---------- | ---------------------------------- |
| v0.1.2 | 2022-08-03 | 获取模版项目，快速构建前端项目代码 |
| v0.1.3 | 2022-08-11 | 更新分组密钥                       |

## 待更新功能

- 脚手架安全性优化

---
_Source: https://npm.io/package/yangtze-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
