wwmp-cli

A simple CLI for creating your projects

Usage no npm install needed!

<script type="module">
  import wwmpCli from 'https://cdn.skypack.dev/wwmp-cli';
</script>

README

安装

npm install wwmp-cli -g

使用

推荐使用方式:

1. wwmp add

? Set the custom name of the template: init【本机记录模板名】
? Owner/name of the template: pageek/wwmp-quickstart

2. wwmp c init demo

或者直接使用github Owner/Name仓库直接初始化:

示例:wwmp create <Template Name || Owner/Name>

wwmp c pageek/wwmp-quickstart demo

  Usage: wwmp <command>


  Commands:

    add     | a     添加模板
    list    | l     显示所有模板列表
    create  | c     通过wwmp create <Template Name || Owner/Name> <Project Name> 初始化新项目
    init    | i     通过wwmp init选择模板并创建一个新项目
    delete  | d     删除预置模板

  Options:

    -h, --help     输出帮助信息
    -V, --version  输出版本号信息

Commands

add | a

$ wwmp add

Template Name: wwmp             【自定义模板名,用于管理模板和选择时使用】
Owner/name: alenguo/wwmp        【github仓库用户名/项目名,用于自动下载github项目使用】
Branch: master                  【github仓库的分支选择】
┌───────────────┬──────────────────────────┬────────┐
│ Template Name │ Owner/Name               │ Branch │
├───────────────┼──────────────────────────┼────────┤
│ argbJS        │ alenguo/argbJS           │ master │
├───────────────┼──────────────────────────┼────────┤
│ chuko         │ alenguo/chuko-quickstart │ master │
├───────────────┼──────────────────────────┼────────┤
│ wwmp          │ alenguo/wwmp-cli-init    │ master │
└───────────────┴──────────────────────────┴────────┘

list | l

$ wwmp list

┌───────────────┬──────────────────────────┬────────┐
│ Template Name │ Owner/Name               │ Branch │
├───────────────┼──────────────────────────┼────────┤
│ argbJS        │ alenguo/argbJS           │ master │
├───────────────┼──────────────────────────┼────────┤
│ chuko         │ alenguo/chuko-quickstart │ master │
├───────────────┼──────────────────────────┼────────┤
│ wwmp          │ alenguo/wwmp-cli-init    │ master │
└───────────────┴──────────────────────────┴────────┘

create | c

$ wwmp create <Template Name || Owner/Name> <Project Name>

? Where to init the project? ../
? Project description: (A wwmp-cli init project) 
? Author: (wwmp) 
? Use wwui-mp? (y/N) 
? Use ESLint to lint your code? (y/N) 

⠹ Downloading template...

New project has been initialized successfully!

init | i

$ wwmp init

? Template name: my-first-template
? Project name: my-project
? Where to init the project? ../
⠹ Downloading template...

New project has been initialized successfully!

delete | d

$ wwmp delete

? Which template you want to delete?
┌───────────────┬──────────────────────────┬────────┐
│ Template Name │ Owner/Name               │ Branch │
├───────────────┼──────────────────────────┼────────┤
│ argbJS        │ alenguo/argbJS           │ master │
├───────────────┼──────────────────────────┼────────┤
│ chuko         │ alenguo/chuko-quickstart │ master │
├───────────────┼──────────────────────────┼────────┤
│ wwmp          │ alenguo/wwmp-cli-init    │ master │
└───────────────┴──────────────────────────┴────────┘