diff --git a/bin/config.js b/bin/config.js index 66d3bff..dd6a112 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: '创建CSharp项目', value: 'cSharp' }, { name: '创建MD文档项目', value: 'docs' }, ], }, @@ -66,15 +67,23 @@ const java = [ }, ]; +// cSharp +const cSharp = [ + { + type: 'list', + message: 'C#️ 选择Java模板', + name: 'cSharp', + choices: [{ name: 'C# 单体开发模板', value: 'Csharp_single' }], + }, +]; + // docs const docs = [ { type: 'list', message: '📑选择文档模板', name: 'docs', - choices: [ - { name: '基于Hope文档', value: 'bunny_docs' }, - ], + choices: [{ name: '基于Hope文档', value: 'bunny_docs' }], }, ]; @@ -96,9 +105,11 @@ 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', + // ? cSharp模版 + 'cSharp&Csharp_single': 'https://gitee.com/BunnyBoss/bunny-template.git', // ? docs模板 - "docs&bunny_docs": 'https://gitee.com/BunnyBoss/bunny_docs.git' + 'docs&bunny_docs': 'https://gitee.com/BunnyBoss/bunny_docs.git', }, // 问题 - question: { frame, vue, large, admin, java,docs }, + question: { frame, vue, large, admin, java, cSharp, docs }, }; diff --git a/bin/utils.js b/bin/utils.js index 3e26c9d..30ac615 100644 --- a/bin/utils.js +++ b/bin/utils.js @@ -70,6 +70,13 @@ module.exports = { return projectList[key]; // 匹配选择内容 } + // cSharp模板 + else if (frame.type === 'cSharp') { + const awsaner = await inquirer.prompt(question.cSharp); + const key = `${frameType}&${awsaner.cSharp}`; + + return projectList[key]; // 匹配选择内容 + } // docs模板 else if (frame.type === 'docs') { const awsaner = await inquirer.prompt(question.docs); diff --git a/package.json b/package.json index b0ae517..89486a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bunny-cli", - "version": "1.2.0", + "version": "1.2.1", "description": "", "main": "index.js", "keywords": [ diff --git a/readme.md b/readme.md index b335770..fbd6f9c 100644 --- a/readme.md +++ b/readme.md @@ -60,6 +60,10 @@ git地址:https://gitee.com/BunnyBoss/java-mirror-server.git - 微服务架构。 +### 👉 CSharp模板 + +git地址:https://gitee.com/BunnyBoss/bunny-template + ### 👉 Docs文档 git地址:https://gitee.com/BunnyBoss/bunny_docs