diff --git a/bin/config.js b/bin/config.js index dab2eff..66d3bff 100644 --- a/bin/config.js +++ b/bin/config.js @@ -9,6 +9,7 @@ const frame = [ { name: '创建大屏项目', value: 'large' }, { name: '创建管理后台', value: 'admin' }, { name: '创建Java项目', value: 'java' }, + { name: '创建MD文档项目', value: 'docs' }, ], }, ]; @@ -65,6 +66,18 @@ const java = [ }, ]; +// docs +const docs = [ + { + type: 'list', + message: '📑选择文档模板', + name: 'docs', + choices: [ + { name: '基于Hope文档', value: 'bunny_docs' }, + ], + }, +]; + // 项目地址链接 module.exports = { // 项目列表 @@ -83,7 +96,9 @@ module.exports = { // ? Java模版 'java&java_single': 'https://gitee.com/BunnyBoss/java_single.git', 'java&java_mirror_server': 'https://gitee.com/BunnyBoss/java-mirror-server.git', + // ? docs模板 + "docs&bunny_docs": 'https://gitee.com/BunnyBoss/bunny_docs.git' }, // 问题 - question: { frame, vue, large, admin, java }, + question: { frame, vue, large, admin, java,docs }, }; diff --git a/bin/utils.js b/bin/utils.js index 13e7dce..3e26c9d 100644 --- a/bin/utils.js +++ b/bin/utils.js @@ -68,6 +68,13 @@ module.exports = { const awsaner = await inquirer.prompt(question.java); const key = `${frameType}&${awsaner.java}`; + return projectList[key]; // 匹配选择内容 + } + // docs模板 + else if (frame.type === 'docs') { + const awsaner = await inquirer.prompt(question.docs); + const key = `${frameType}&${awsaner.docs}`; + return projectList[key]; // 匹配选择内容 } }, @@ -91,6 +98,7 @@ module.exports = { ⚓ 3. 后台模板使用vite,,三种版本可以选择 ⚓ 4. Java单体开发模版 ⚓ 5. Java微服务开发模版 +⚓ 6. docs模板 📄 请查看 README.md... diff --git a/package-lock.json b/package-lock.json index 42e44f9..3b191ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bunny-cli", - "version": "1.1.3", + "version": "1.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bunny-cli", - "version": "1.1.3", + "version": "1.2.0", "license": "ISC", "dependencies": { "chalk": "^4.0.0",