feat: split cli and template
This commit is contained in:
21
bin/cli.js
21
bin/cli.js
@@ -1,21 +0,0 @@
|
||||
#! /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);
|
||||
14
package.json
14
package.json
@@ -1,14 +1,8 @@
|
||||
{
|
||||
"name": "@gushen610140/hucky",
|
||||
"version": "0.0.1",
|
||||
"name": "template-vue-hucky",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"bin": {
|
||||
"hucky": "bin/cli.js"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vue-tsc -b && vite build",
|
||||
@@ -21,9 +15,7 @@
|
||||
"@types/node": "^24.1.0",
|
||||
"@vitejs/plugin-vue-jsx": "^5.0.1",
|
||||
"axios": "^1.11.0",
|
||||
"commander": "^14.0.0",
|
||||
"daisyui": "^5.0.50",
|
||||
"download-git-repo": "^3.0.2",
|
||||
"motion-v": "^1.6.1",
|
||||
"pinia": "^3.0.3",
|
||||
"pinia-plugin-persistedstate": "^4.4.1",
|
||||
|
||||
Reference in New Issue
Block a user