# myvue3cli

> a vue cli

Latest version **1.0.0** (published 2023-02-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install myvue3cli
pnpm add myvue3cli
yarn add myvue3cli
bun add myvue3cli
```

Provides the commands `cm`, `cm-add`, `cm-init`, `cm-list`, `cm-delete`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-02-17 |
| First published | 2023-02-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | beizi |

## Links

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

## Dependencies (7)

- [ora](https://npm.io/package/ora.md) ^3.2.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [inquirer](https://npm.io/package/inquirer.md) ^6.2.2
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.6
- [commander](https://npm.io/package/commander.md) ^2.19.0
- [log-symbols](https://npm.io/package/log-symbols.md) ^4.0.0
- [download-git-repo](https://npm.io/package/download-git-repo.md) ^1.1.0

## Recent versions

- 1.0.0 (latest) — 2023-02-17

## README

## 需要的插件
commander: 命令行工具
download-git-repo: 用来下载远程模板
inquirer: 交互式命令行工具
ora: 显示 loading 动画
chalk: 修改控制台输出内容样式
log-symbols: 显示出 √ 或 × 等的图标
handlebars.js 用户提交的信息动态填充到文件中

## 编写指令

在这里会用到 inquirer 进行命令行交互，我们先来看下 inquirer 的用法，它有以下参数可以配置

type：表示提问的类型，包括：input, confirm, list, rawlist, expand, checkbox, password, editor；
name: 存储当前问题回答的变量；
message：问题的描述；
default：默认值；
choices：列表选项，在某些 type 下可用，并且包含一个分隔符(separator)；
validate：对用户的回答进行校验；
filter：对用户的回答进行过滤处理，返回处理后的值；
when：根据前面问题的回答，判断当前问题是否需要被回答；
prefix：修改 message 默认前缀；
suffix：修改 message 默认后缀。

## 语法结构
```js
const inquirer = require('inquirer')

const question = [
  // 具体交互内容
]

inquirer.prompt(question).then((answers) => {
  console.log(answers) // 返回的结果
})
```

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