feat: publish on npm
This commit is contained in:
21
bin/cli.js
Normal file
21
bin/cli.js
Normal file
@@ -0,0 +1,21 @@
|
||||
#! /usr/bin/env node
|
||||
import download from "download-git-repo";
|
||||
import { program } from "commander";
|
||||
|
||||
program
|
||||
.command("create <project-name>")
|
||||
.description("创建项目")
|
||||
.action((projectName) => {
|
||||
download(
|
||||
"github:gushen610140/template-vue-hucky",
|
||||
projectName,
|
||||
{ clone: true },
|
||||
(err) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
program.parse(process.argv);
|
||||
Reference in New Issue
Block a user