# yz-cli

> yazuo web project scaffold

Latest version **0.6.11** (published 2018-02-02) · ISC license · 0 weekly downloads

## Install

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

Provides the command `ya`.

## 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.6.11 |
| Published | 2018-02-02 |
| First published | 2017-09-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 21 |
| Known vulnerabilities | 0 (+43 in 8 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mingrenjbdt |
| Maintainers | mingrenjbdt |
| Keywords | ya, cli |

## Links

- npm: https://www.npmjs.com/package/yz-cli
- Repository: https://github.com/MingNeo/ya-cli
- Homepage: https://github.com/MingNeo/ya-cli#readme
- Issues: https://github.com/MingNeo/ya-cli/issues
- npm.io page: https://npm.io/package/yz-cli

## Dependencies (21)

- [npm](https://npm.io/package/npm.md) 5.4.2
- [ora](https://npm.io/package/ora.md) 1.2.0
- [async](https://npm.io/package/async.md) 2.5.0
- [chalk](https://npm.io/package/chalk.md) 1.1.3
- [figlet](https://npm.io/package/figlet.md) 1.2.0
- [global](https://npm.io/package/global.md) 4.3.2
- [lodash](https://npm.io/package/lodash.md) 4.17.4
- [rimraf](https://npm.io/package/rimraf.md) 2.6.2
- [request](https://npm.io/package/request.md) 2.81.0
- [flow-bin](https://npm.io/package/flow-bin.md) 0.54.1
- [inquirer](https://npm.io/package/inquirer.md) 3.0.6
- [commander](https://npm.io/package/commander.md) 2.9.0
- [minimatch](https://npm.io/package/minimatch.md) 3.0.4
- [user-home](https://npm.io/package/user-home.md) 2.0.0
- [handlebars](https://npm.io/package/handlebars.md) 4.0.10
- [metalsmith](https://npm.io/package/metalsmith.md) 2.3.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) 5.1.0
- [deep-assign](https://npm.io/package/deep-assign.md) 2.0.0
- [art-template](https://npm.io/package/art-template.md) 4.12.1
- [promise-exec](https://npm.io/package/promise-exec.md) 0.1.0
- [download-git-repo](https://npm.io/package/download-git-repo.md) 1.0.1

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 0.6.11 (latest) — 2018-02-02
- 0.6.10 — 2018-02-01
- 0.6.9 — 2018-02-01
- 0.6.8 — 2018-01-23
- 0.6.7 — 2018-01-18
- 0.6.6 — 2017-12-13
- 0.6.5 — 2017-12-13
- 0.6.4 — 2017-12-13
- 0.6.3 — 2017-12-12
- 0.6.1 — 2017-12-12
- 0.6.0 — 2017-12-12
- 0.5.9 — 2017-12-11
- 0.5.8 — 2017-12-11
- 0.5.7 — 2017-12-08
- 0.5.5 — 2017-12-07
- … 16 more at https://npm.io/package/yz-cli/versions

## README

# ya-cli

Simple CLI for scaffolding Ya projects

## 安装

环境 : [Node.js](https://nodejs.org/en/download/) , npm 3.0+、 [Git](https://git-scm.com/).

```bash
npm install -g yz-cli
```

## 创建项目

在要创建项目的路径执行 ‘ya init’。

```bash
$ ya

  Usage: ya <command> [options]

  Options:

    -V, --version  output the version number
    -h, --help     output usage information

$ ya init

  Usage: ya-init [project-name]


  Options:

    -o, --offline  使用已经下载的本地模板
    --template [value] 选择使用的模板
    -i, --install  下载模板后自动安装依赖
    -h, --help     output usage information

$ ya update
  Usage: ya-update [project-name]

  Options:

    -h, --help          output usage information
    -o, --offline       使用本地模板
    --template [value]  选择使用的模板
    -i, --install       下载模板后自动安装依赖
```

### Examples:

创建 / 更新项目

```
$ ya init project1
```

在当前目录创建 / 更新项目

```
$ ya init
```

更新当前项目

```
$ ya update project1
```

在当前目录更新项目

```
$ ya update
```

使用本地模板 & 自动安装依赖

```
$ ya init project1 -i -o
```

## 默认模板进行开发

[默认模板](https://github.com/q13/ya-spa-vue) 使用如下

#### 开发环境

开启本地服务器开发并热替换。默认开启 eslint(standard)、flow。

```
$ cd [project]
$ npm run dev
```

#### 生产

```
$ npm run build
```

#### mock

使用[mockjs](http://mockjs.com/)规则生成 mock 数据。

```
$ npm run mock
```

开启 mock 服务后即可本地 mock 请求。配置规则参考 tools/config dev.proxyTable。可于/src/mock 文件夹按请求地址创建 js/json 文件并填写符合 mockjs 规则或普通数据。如:

```
c2s('/ya/modules/test')

对应
  \ya
  -- \modules
  ---- \test.json
```

#### flow

```
默认集成在eslint中。
也可以关闭自行使用 $ npm run flow 检测，或 $ npm run flowserver 实时监听。
使用eslint时,如遇到提示模块未发现。可手动执行stopflow关闭flow服务后重新
$ npm run dev
```

## 自定义模板

自定义模板无需发布到 npm，只需上传到 github 并通过 template 参数使用即可

```
$ ya init project1 --template q13/vue-spa-template
```

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