1.0.1 • Published 10 months ago

zhych-cli v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Installation

npm install zhych-cli -g

or

git clone https://github.com/ZHYCH992/z-cli.git
cd z-cli && npm install
npm link

Usage

Open your terminal an typed v -h , you'll see the help infomation below:

Usage: v <command>

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

Commands:
  add            add a new template
  delete         delete a template
  list           List the templateList
  init           init a project

z add

This command would help you to add a new template to the templates.json, which will be used by z to init projects.

$ z add
? 请输入模板名称 carete-react-app--template
? 请输入模板地址 https://github.com/ZHYCH992/create-react-app--template.git

√ Add a template successfully!

The latest templateList is:

┌────────────────────────────┬────────────────────────────────────────────────────────────┐
│ name                       │ url                                                        │
├────────────────────────────┼────────────────────────────────────────────────────────────┤
│ carete-react-app--template │ https://github.com/ZHYCH992/create-react-app--template.git │
├────────────────────────────┼────────────────────────────────────────────────────────────┤
│ Sales-Kanban               │ https://github.com/ZHYCH992/Sales-Kanban.git               │
└────────────────────────────┴────────────────────────────────────────────────────────────┘

z delete

To delete a template, you could use this command:

$ z delete
? 请输入要删除的模板名称 Sales-Kanban

√ Deleted successfully!

The latest templateList is:

┌────────────────────────────┬────────────────────────────────────────────────────────────┐
│ name                       │ url                                                        │
├────────────────────────────┼────────────────────────────────────────────────────────────┤
│ carete-react-app--template │ https://github.com/ZHYCH992/create-react-app--template.git │
└────────────────────────────┴────────────────────────────────────────────────────────────┘

z list

This command will shows you the templates list.

$ z list
┌────────────────────────────┬────────────────────────────────────────────────────────────┐
│ name                       │ url                                                        │
├────────────────────────────┼────────────────────────────────────────────────────────────┤
│ carete-react-app--template │ https://github.com/ZHYCH992/create-react-app--template.git │
└────────────────────────────┴────────────────────────────────────────────────────────────┘

z init

You can init a templates use this command

z init carete-react-app--template project