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