1.0.3 • Published 2 years ago

hm-vcli v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Installation

npm install hm-vcli -g

or

git clone https://github.com/Michael-lzg/cm-cli.git
cd hm-cli && npm install
npm link


如果之前关联过记得先:npm unlink 之后再 npm link 

Usage

Open your terminal and type hm -h , you'll see the help infomation below:

Usage: hm <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

hm add

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

$ hm add
? 请输入模板名称 admin
? 请输入模板地址 https://github.com/Michael-lzg/vue-ant-template.git

√ Add a template successfully!

The latest templateList is:

┌───────┬─────────────────────────────────────────────────────┐
│ name  │ url                                                 │
├───────┼─────────────────────────────────────────────────────┤
│ app   │ https://github.com/Michael-lzg/vue-cli4-vant.git    │
├───────┼─────────────────────────────────────────────────────┤
│ admin │ https://github.com/Michael-lzg/vue-ant-template.git │
└───────┴─────────────────────────────────────────────────────┘

hm delete

To delete a template, you could use this command:

$ hm delete
? 请输入要删除的模板名称 admin
? 请输入要删除的模板名称 admin

√ Deleted successfully!

The latest templateList is:

┌──────┬──────────────────────────────────────────────────┐
│ name │ url                                              │
├──────┼──────────────────────────────────────────────────┤
│ app  │ https://github.com/Michael-lzg/vue-cli4-vant.git │
└──────┴──────────────────────────────────────────────────┘

hm list

This command will shows you the templates list.

$ hm list
┌──────┬──────────────────────────────────────────────────┐
│ name │ url                                              │
├──────┼──────────────────────────────────────────────────┤
│ app  │ https://github.com/Michael-lzg/vue-cli4-vant.git │
└──────┴──────────────────────────────────────────────────┘

hm init

You can init a templates use this command

hm init app project