# zpp-cli

> A simple CLI for creating your projects

Latest version **0.0.4** (published 2017-04-20) · MIT license · 0 weekly downloads

## Install

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

Provides the command `zpp`.

## 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.0.4 |
| Published | 2017-04-20 |
| First published | 2017-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ZP |
| Maintainers | zhongping |
| Keywords | zp, cli, 脚手架 |

## Links

- npm: https://www.npmjs.com/package/zpp-cli
- Repository: https://github.com/zhongpingWang/zp
- Homepage: https://github.com/zhongpingWang/zp#readme
- Issues: https://github.com/zhongpingWang/zp/issues
- npm.io page: https://npm.io/package/zpp-cli

## Dependencies (5)

- [co](https://npm.io/package/co.md) ^4.6.0
- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [inquirer](https://npm.io/package/inquirer.md) ^3.0.6
- [co-prompt](https://npm.io/package/co-prompt.md) ^1.0.0
- [commander](https://npm.io/package/commander.md) ^2.9.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.0.4 (latest) — 2017-04-20

## README

![Zp Logo](./logo.jpg)

# ZP
网上找代码 自己实现的第一个脚手架

# Installation
```
npm install zp-cli -g
```
or
```
git clone https://github.com/zhongpingWang/zp.git

cd zp && npm install

npm link
```

# Usage
Open your terminal and type `zp` or `zp -h` , you'll see the help infomation below:
```
  Usage: zp <command>


  Commands:

    add|a           Add a new template
    list|l          List all the templates
    init|i          Generate a new project
    delete|d        Delete a template
    chorse|c        支持选择创建
    delchrose|dc    选择删除

  Options:

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

# Commands
### add | a
This command would help you to add a new template to the `templates.json`, which will be used by zp to generate projects.
```
$ zp add
```
```
 /*  your template's name */
Template name: my-tpl

 /* your template's git https link, note that it ends with .git */
Git https link:  https://gitxxx/somebody/my-tpl.git 

 /* your template's branch */
Branch: master 
```
Once confirm you'll see the message like below:
```
The last template list is:

{ tpl:
   { 'my-tpl-name':
      { url: 'https://github.com/zhongpingWang/ReactTree',
        branch: 'master' } } }
```
Now you've added a new template to zp successfully.

### list | l
It shows you the templates list.
```
$ zp list

{ tpl:
   { 'my-tpl-name':
      { url: 'https://github.com/zhongpingWang/ReactTree',
        branch: 'master' } } }
```

### init | i
After adding new templates, you could use this command to generate your own project by choosing template.
```
$ zp init

/* enter a template name which was added by yourself */
Template name: my-tpl-name

/* your project name */
Project name: my-new-project
```
After enter correct template name and confirm, you'll see the message below:
```
Start generating...

 √ Generation completed!

 cd my-new-project && npm install
```
It's easy, right?

### delete | d
To delete a template, you could use this command:
```
$ zp delete
```
and type the template name you want to delete:
```
Template name: my-tpl-name
```
if the name exist, you will see:
```
Template deleted!
The last template list is:

{ tpl:
   { 'my-tpl-name': undefined } }
```
once a template is `undefined`, it means you've deleted it successfully.

# Template
The most important part of zp is `template`. All templates' infomation were list in the `templates.json`.
A template means a project sample, which has a simple or complex file structure.

You can create your own templates repository, and push your templates in different branches. All you need to do then is to add the templates into zp's `templates.json`.

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