feat: 新增功能: 🚀 删除部分模板;更新文档;引入第三方内容
This commit is contained in:
parent
f2c9364c48
commit
dd6f782caa
|
@ -5,7 +5,6 @@ const frame = [
|
||||||
message: '选择什么框架去新建项目❓',
|
message: '选择什么框架去新建项目❓',
|
||||||
name: 'type',
|
name: 'type',
|
||||||
choices: [
|
choices: [
|
||||||
{ name: '创建react项目', value: 'react' },
|
|
||||||
{ name: '创建vue项目', value: 'vue' },
|
{ name: '创建vue项目', value: 'vue' },
|
||||||
{ name: '创建大屏项目', value: 'large' },
|
{ name: '创建大屏项目', value: 'large' },
|
||||||
{ name: '创建管理后台', value: 'admin' },
|
{ name: '创建管理后台', value: 'admin' },
|
||||||
|
@ -14,30 +13,13 @@ const frame = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// react框架
|
|
||||||
const react = [
|
|
||||||
{
|
|
||||||
type: 'list',
|
|
||||||
message: '📢react部分默认包含redux/toolkit;🚶选择路由创建位置',
|
|
||||||
name: 'router',
|
|
||||||
choices: [
|
|
||||||
{ name: '使用RouterProvider', value: 'RouterProvider' },
|
|
||||||
{ name: '使用userouter', value: 'userouter' },
|
|
||||||
{ name: '使用userouter和zustand', value: 'zustand' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// vue
|
// vue
|
||||||
const vue = [
|
const vue = [
|
||||||
{
|
{
|
||||||
type: 'list',
|
type: 'list',
|
||||||
message: '🚶选择vue仓库',
|
message: '🚶选择vue仓库',
|
||||||
name: 'router',
|
name: 'router',
|
||||||
choices: [
|
choices: [{ name: 'Vite-pina模板', value: 'vite' }],
|
||||||
{ name: 'Vue-pina模板', value: 'vue' },
|
|
||||||
{ name: 'Vue-pina模板', value: 'vite' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -64,8 +46,8 @@ const admin = [
|
||||||
name: 'admin',
|
name: 'admin',
|
||||||
choices: [
|
choices: [
|
||||||
{ name: '后台自动路由vue+pinia+antdesgin', value: 'bunny_admin' },
|
{ name: '后台自动路由vue+pinia+antdesgin', value: 'bunny_admin' },
|
||||||
{ name: '后台自动路由vue+pinia+elementPlus', value: 'bunny_admin_element' },
|
{ name: '后台vue-pure-admin', value: 'bunny_admin_element' },
|
||||||
{ name: '后台自动路由vue+pinia+elementPlus精简版', value: 'bunny_admin_element_thin' },
|
{ name: '后台vue-pure-admin精简版', value: 'bunny_admin_element_thin' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -88,25 +70,20 @@ module.exports = {
|
||||||
// 项目列表
|
// 项目列表
|
||||||
projectList: {
|
projectList: {
|
||||||
// ? vue模板
|
// ? vue模板
|
||||||
'vue&vue': 'https://gitee.com/BunnyBoss/vue_ts_auto.git',
|
|
||||||
'vue&vite': 'https://gitee.com/BunnyBoss/vite_ts_auto.git',
|
'vue&vite': 'https://gitee.com/BunnyBoss/vite_ts_auto.git',
|
||||||
// ? 大屏模板
|
// ? 大屏模板
|
||||||
'large&vue_large_rem': 'https://gitee.com/BunnyBoss/vue_ts_large_rem.git',
|
'large&vue_large_rem': 'https://gitee.com/BunnyBoss/vue_ts_large_rem.git',
|
||||||
'large&vue_large_scale': 'https://gitee.com/BunnyBoss/vue_ts_large_scale.git',
|
'large&vue_large_scale': 'https://gitee.com/BunnyBoss/vue_ts_large_scale.git',
|
||||||
'large&vue_ts_large_vmvh': 'https://gitee.com/BunnyBoss/vue_ts_large_vmvh.git',
|
'large&vue_ts_large_vmvh': 'https://gitee.com/BunnyBoss/vue_ts_large_vmvh.git',
|
||||||
'large&vue_ts_large_remvmvh': 'https://gitee.com/BunnyBoss/vue_ts_large_remvmvh.git',
|
'large&vue_ts_large_remvmvh': 'https://gitee.com/BunnyBoss/vue_ts_large_remvmvh.git',
|
||||||
// ? react 版本
|
|
||||||
'react&userouter': 'https://gitee.com/BunnyBoss/react_ts_userouter.git',
|
|
||||||
'react&RouterProvider': 'https://gitee.com/BunnyBoss/react_ts_routerprovider.git',
|
|
||||||
'react&zustand': 'https://gitee.com/BunnyBoss/react_ts_zustand.git',
|
|
||||||
// ? 后台管理
|
// ? 后台管理
|
||||||
'admin&bunny_admin': 'https://gitee.com/BunnyBoss/bunny-admin.git',
|
'admin&bunny_admin': 'https://gitee.com/BunnyBoss/bunny-admin.git',
|
||||||
'admin&bunny_admin_element': 'https://gitee.com/BunnyBoss/bunny-admin-element.git',
|
'admin&bunny_admin_element': 'https://gitee.com/yiming_chang/vue-pure-admin.git',
|
||||||
'admin&bunny_admin_element_thin': 'https://gitee.com/BunnyBoss/bunny-admin-element-thin',
|
'admin&bunny_admin_element_thin': 'https://gitee.com/BunnyBoss/bunny-admin-element-thin',
|
||||||
// ? Java模版
|
// ? Java模版
|
||||||
'java&java_single': 'https://gitee.com/BunnyBoss/java_single.git',
|
'java&java_single': 'https://gitee.com/BunnyBoss/java_single.git',
|
||||||
'java&java_mirror_server': 'https://gitee.com/BunnyBoss/java-mirror-server.git',
|
'java&java_mirror_server': 'https://gitee.com/BunnyBoss/java-mirror-server.git',
|
||||||
},
|
},
|
||||||
// 问题
|
// 问题
|
||||||
question: { frame, react, vue, large, admin, java },
|
question: { frame, vue, large, admin, java },
|
||||||
};
|
};
|
||||||
|
|
14
bin/utils.js
14
bin/utils.js
|
@ -41,15 +41,8 @@ module.exports = {
|
||||||
const frame = await inquirer.prompt(question.frame);
|
const frame = await inquirer.prompt(question.frame);
|
||||||
const frameType = `${frame.type}`;
|
const frameType = `${frame.type}`;
|
||||||
|
|
||||||
// 如果选择的react框架
|
|
||||||
if (frame.type === 'react') {
|
|
||||||
const awsaner = await inquirer.prompt(question.react);
|
|
||||||
const key = `${frameType}&${awsaner.router}`;
|
|
||||||
|
|
||||||
return projectList[key]; // 匹配选择内容
|
|
||||||
}
|
|
||||||
// 如果选择是vue框架
|
// 如果选择是vue框架
|
||||||
else if (frame.type === 'vue') {
|
if (frame.type === 'vue') {
|
||||||
const awsaner = await inquirer.prompt(question.vue);
|
const awsaner = await inquirer.prompt(question.vue);
|
||||||
const key = `${frameType}&${awsaner.router}`;
|
const key = `${frameType}&${awsaner.router}`;
|
||||||
|
|
||||||
|
@ -96,9 +89,8 @@ module.exports = {
|
||||||
⚓ 1. vue大屏默认pinia仓库,安装Vue-ECharts,使用rem、vwvh、rem+vwvh、scale布局
|
⚓ 1. vue大屏默认pinia仓库,安装Vue-ECharts,使用rem、vwvh、rem+vwvh、scale布局
|
||||||
⚓ 2. vue开发模版使用vite
|
⚓ 2. vue开发模版使用vite
|
||||||
⚓ 3. 后台模板使用vite,,三种版本可以选择
|
⚓ 3. 后台模板使用vite,,三种版本可以选择
|
||||||
⚓ 4. React模板3种方式
|
⚓ 4. Java单体开发模版
|
||||||
⚓ 5. Java单体开发模版
|
⚓ 5. Java微服务开发模版
|
||||||
⚓ 6. Java微服务开发模版
|
|
||||||
|
|
||||||
📄 请查看 README.md...
|
📄 请查看 README.md...
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bunny-cli",
|
"name": "bunny-cli",
|
||||||
"version": "1.1.10",
|
"version": "1.2.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
37
readme.md
37
readme.md
|
@ -16,11 +16,9 @@
|
||||||
|
|
||||||
脚手架源码地址:https://gitee.com/BunnyBoss/bunny-cli.git
|
脚手架源码地址:https://gitee.com/BunnyBoss/bunny-cli.git
|
||||||
|
|
||||||
### 👉 Vue模板
|
### 👉 Vite模板
|
||||||
|
|
||||||
**由于个人原因vue模板无法维护,后面只维护vite模板**
|
git地址:https://gitee.com/BunnyBoss/vite_ts_auto.git
|
||||||
|
|
||||||
git地址:https://gitee.com/BunnyBoss/vue_ts_auto.git
|
|
||||||
|
|
||||||
- 自动化路由,根据路目录自动生成路由
|
- 自动化路由,根据路目录自动生成路由
|
||||||
- 基础媒体图片如404等图片
|
- 基础媒体图片如404等图片
|
||||||
|
@ -28,12 +26,6 @@ git地址:https://gitee.com/BunnyBoss/vue_ts_auto.git
|
||||||
|
|
||||||
> vue路由动态生成文档:https://blog.csdn.net/weixin_46533577/article/details/138617997
|
> vue路由动态生成文档:https://blog.csdn.net/weixin_46533577/article/details/138617997
|
||||||
|
|
||||||
### 👉 Vite模板
|
|
||||||
|
|
||||||
git地址:https://gitee.com/BunnyBoss/vite_ts_auto.git
|
|
||||||
|
|
||||||
- 和vue模板一样,同样的实现方式,只是路由不一样。
|
|
||||||
|
|
||||||
### 👉 Vue大屏模板
|
### 👉 Vue大屏模板
|
||||||
|
|
||||||
git地址:
|
git地址:
|
||||||
|
@ -50,17 +42,13 @@ git地址:https://gitee.com/BunnyBoss/bunny-admin.git
|
||||||
|
|
||||||
- 采用Gitee上开源[GuYue大屏](https://gitee.com/Y_lao/GuYue-Admin)
|
- 采用Gitee上开源[GuYue大屏](https://gitee.com/Y_lao/GuYue-Admin)
|
||||||
|
|
||||||
git地址:https://gitee.com/BunnyBoss/bunny-admin-element.git
|
git地址:https://gitee.com/yiming_chang/vue-pure-admin.git
|
||||||
|
|
||||||
- 采用pure-admin
|
- 采用vue-pure-admin
|
||||||
|
|
||||||
### 👉 React模板
|
git地址:https://gitee.com/BunnyBoss/bunny-admin-element-thin
|
||||||
|
|
||||||
- zustand仓库:**[react_ts_zustand](https://gitee.com/BunnyBoss/react_ts_zustand)**
|
- 因为vue-pure-admin很多都写好,想删除写东西,这个是精简版的。
|
||||||
- 新版路由:https://gitee.com/BunnyBoss/react_ts_routerprovider.git
|
|
||||||
- 传统路由:https://gitee.com/BunnyBoss/react_ts_userouter.git
|
|
||||||
|
|
||||||
- 未来可能会打算放弃,一个人精力有限,目前中小公司不用React还是以Vue为主。
|
|
||||||
|
|
||||||
### 👉 Java模板
|
### 👉 Java模板
|
||||||
|
|
||||||
|
@ -82,6 +70,13 @@ git地址:https://gitee.com/BunnyBoss/bunny_docs
|
||||||
|
|
||||||
1. 将模板中融合路由权限。
|
1. 将模板中融合路由权限。
|
||||||
2. 修改后台模板,在新增一个后台管理。
|
2. 修改后台模板,在新增一个后台管理。
|
||||||
3. 会放弃React更新,忙不过来。
|
3. 再优化优化各个项目
|
||||||
4. 再优化优化各个项目
|
4. 未来将docs文档再优化下使它更全面更好用。
|
||||||
5. 未来将docs文档再优化下使它更全面更好用。
|
|
||||||
|
## 🆕更新内容
|
||||||
|
|
||||||
|
1. 删除vue模板中vue-cli版本
|
||||||
|
2. 删除所有React版本模板
|
||||||
|
3. 直接引入vue-pure-admin内容
|
||||||
|
4. 加入精简版的vue-pure-admin
|
||||||
|
5. 模板中加入控制台内容输出
|
||||||
|
|
Loading…
Reference in New Issue