@gx-design-vue/create-gx-cli 0.0.5 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/cli.js +3 -3
- package/src/main.js +6 -1
- package/template-mobile-vant-cli/build/generateModifyVars.ts +7 -0
- package/template-mobile-vant-cli/build/script/postBuild.ts +0 -1
- package/{template-design-pro/src/components/GDesign/ProLayout/components/PageContainer/typings.ts → template-mobile-vant-cli/src/design/config.less} +0 -0
- package/template-mobile-vant-cli/types/components.d.ts +0 -2
- package/template-mobile-vant-cli/types/global.d.ts +3 -3
- package/template-mobile-vant-cli/types/module.d.ts +0 -2
- package/template-mobile-vant-cli/vite.config.ts +6 -7
- package/template-design-pro/.editorconfig +0 -19
- package/template-design-pro/.env +0 -2
- package/template-design-pro/.env.development +0 -18
- package/template-design-pro/.env.pro +0 -32
- package/template-design-pro/.env.production +0 -32
- package/template-design-pro/.env.test +0 -20
- package/template-design-pro/.eslintignore +0 -16
- package/template-design-pro/.eslintrc.js +0 -64
- package/template-design-pro/.gitpod.yml +0 -6
- package/template-design-pro/.husky/pre-commit +0 -4
- package/template-design-pro/.prettierignore +0 -9
- package/template-design-pro/.stylelintignore +0 -3
- package/template-design-pro/.yarnclean +0 -48
- package/template-design-pro/LICENSE +0 -21
- package/template-design-pro/README.md +0 -111
- package/template-design-pro/build/constant.ts +0 -6
- package/template-design-pro/build/generate/generateModifyVars.ts +0 -18
- package/template-design-pro/build/getConfigFileName.ts +0 -13
- package/template-design-pro/build/script/buildConf.ts +0 -44
- package/template-design-pro/build/script/postBuild.ts +0 -25
- package/template-design-pro/build/script/reSetRootHtml.ts +0 -20
- package/template-design-pro/build/utils.ts +0 -85
- package/template-design-pro/build/vite/cdn.ts +0 -7
- package/template-design-pro/build/vite/optimizer.ts +0 -22
- package/template-design-pro/build/vite/plugin/autoImport.ts +0 -18
- package/template-design-pro/build/vite/plugin/compress.ts +0 -35
- package/template-design-pro/build/vite/plugin/hmr.ts +0 -25
- package/template-design-pro/build/vite/plugin/html.ts +0 -47
- package/template-design-pro/build/vite/plugin/index.ts +0 -89
- package/template-design-pro/build/vite/plugin/mock.ts +0 -20
- package/template-design-pro/build/vite/plugin/pwa.ts +0 -37
- package/template-design-pro/build/vite/plugin/styleImport.ts +0 -129
- package/template-design-pro/build/vite/plugin/visualizer.ts +0 -17
- package/template-design-pro/build/vite/plugin/vite-plugin-antd-theme/index.ts +0 -24
- package/template-design-pro/build/vite/plugin/vite-plugin-mock/createMockServer.ts +0 -303
- package/template-design-pro/build/vite/plugin/vite-plugin-mock/createProdMockServer.ts +0 -93
- package/template-design-pro/build/vite/plugin/vite-plugin-mock/index.ts +0 -68
- package/template-design-pro/build/vite/plugin/vite-plugin-mock/types.ts +0 -30
- package/template-design-pro/build/vite/plugin/vite-plugin-mock/utils.ts +0 -26
- package/template-design-pro/commitlint.config.js +0 -32
- package/template-design-pro/config/config.ts +0 -14
- package/template-design-pro/config/default/animate.ts +0 -30
- package/template-design-pro/config/default/defaultSettings.ts +0 -75
- package/template-design-pro/config/default/network.ts +0 -16
- package/template-design-pro/config/default/proxy.ts +0 -26
- package/template-design-pro/config/default/theme.ts +0 -43
- package/template-design-pro/config/default/themeColor.ts +0 -62
- package/template-design-pro/index.html +0 -45
- package/template-design-pro/jest.config.mjs +0 -36
- package/template-design-pro/mock/_createProductionServer.ts +0 -19
- package/template-design-pro/mock/_util.ts +0 -55
- package/template-design-pro/mock/controller/menu.ts +0 -85
- package/template-design-pro/mock/controller/notices.ts +0 -114
- package/template-design-pro/mock/system/dict.ts +0 -60
- package/template-design-pro/mock/system/user.ts +0 -218
- package/template-design-pro/package.json +0 -151
- package/template-design-pro/pnpm-lock.yaml +0 -9913
- package/template-design-pro/postcss.config.js +0 -5
- package/template-design-pro/prettier.config.js +0 -18
- package/template-design-pro/public/resource/css/index.css +0 -171
- package/template-design-pro/public/resource/img/favicon.ico +0 -0
- package/template-design-pro/public/resource/img/logo.png +0 -0
- package/template-design-pro/public/resource/img/pro_icon.svg +0 -5
- package/template-design-pro/public/resource/img/pwa-192x192.png +0 -0
- package/template-design-pro/public/resource/img/pwa-512x512.png +0 -0
- package/template-design-pro/src/App.vue +0 -47
- package/template-design-pro/src/assets/error_images/403.png +0 -0
- package/template-design-pro/src/assets/error_images/404.png +0 -0
- package/template-design-pro/src/assets/error_images/cloud.png +0 -0
- package/template-design-pro/src/assets/login_images/login_background.svg +0 -69
- package/template-design-pro/src/assets/logo.png +0 -0
- package/template-design-pro/src/assets/menu_font/iconfont.css +0 -94
- package/template-design-pro/src/assets/menu_font/iconfont.eot +0 -0
- package/template-design-pro/src/assets/menu_font/iconfont.js +0 -1
- package/template-design-pro/src/assets/menu_font/iconfont.json +0 -142
- package/template-design-pro/src/assets/menu_font/iconfont.svg +0 -57
- package/template-design-pro/src/assets/menu_font/iconfont.ttf +0 -0
- package/template-design-pro/src/assets/menu_font/iconfont.woff +0 -0
- package/template-design-pro/src/assets/menu_font/iconfont.woff2 +0 -0
- package/template-design-pro/src/assets/menu_font/index.less +0 -94
- package/template-design-pro/src/common/global.ts +0 -1
- package/template-design-pro/src/components/GDesign/ProLayout/BasicLayout.less +0 -80
- package/template-design-pro/src/components/GDesign/ProLayout/BasicLayout.tsx +0 -342
- package/template-design-pro/src/components/GDesign/ProLayout/PageLoading.tsx +0 -20
- package/template-design-pro/src/components/GDesign/ProLayout/RenderTypings.ts +0 -31
- package/template-design-pro/src/components/GDesign/ProLayout/RouteContext.tsx +0 -82
- package/template-design-pro/src/components/GDesign/ProLayout/WrapContent.tsx +0 -69
- package/template-design-pro/src/components/GDesign/ProLayout/components/GlobalFooter/index.tsx +0 -88
- package/template-design-pro/src/components/GDesign/ProLayout/components/GlobalHeader/DefaultHeader.tsx +0 -189
- package/template-design-pro/src/components/GDesign/ProLayout/components/GlobalHeader/Header.less +0 -8
- package/template-design-pro/src/components/GDesign/ProLayout/components/GlobalHeader/index.tsx +0 -105
- package/template-design-pro/src/components/GDesign/ProLayout/components/GlobalHeader/props.ts +0 -69
- package/template-design-pro/src/components/GDesign/ProLayout/components/GlobalHeader/style.less +0 -144
- package/template-design-pro/src/components/GDesign/ProLayout/components/LogoContent/index.tsx +0 -81
- package/template-design-pro/src/components/GDesign/ProLayout/components/LogoContent/props.ts +0 -29
- package/template-design-pro/src/components/GDesign/ProLayout/components/MultiTab/index.tsx +0 -384
- package/template-design-pro/src/components/GDesign/ProLayout/components/MultiTab/props.ts +0 -15
- package/template-design-pro/src/components/GDesign/ProLayout/components/MultiTab/style.less +0 -79
- package/template-design-pro/src/components/GDesign/ProLayout/components/NoticeIcon/NoticeIcon.tsx +0 -148
- package/template-design-pro/src/components/GDesign/ProLayout/components/NoticeIcon/NoticeList.module.less +0 -115
- package/template-design-pro/src/components/GDesign/ProLayout/components/NoticeIcon/NoticeList.tsx +0 -154
- package/template-design-pro/src/components/GDesign/ProLayout/components/NoticeIcon/index.less +0 -39
- package/template-design-pro/src/components/GDesign/ProLayout/components/NoticeIcon/index.tsx +0 -133
- package/template-design-pro/src/components/GDesign/ProLayout/components/PageContainer/index.tsx +0 -190
- package/template-design-pro/src/components/GDesign/ProLayout/components/PageContainer/props.ts +0 -48
- package/template-design-pro/src/components/GDesign/ProLayout/components/PageContainer/style.less +0 -128
- package/template-design-pro/src/components/GDesign/ProLayout/components/RightContent/AvatarDropdown.tsx +0 -63
- package/template-design-pro/src/components/GDesign/ProLayout/components/RightContent/HeaderSearch.tsx +0 -122
- package/template-design-pro/src/components/GDesign/ProLayout/components/RightContent/headerSearch.less +0 -30
- package/template-design-pro/src/components/GDesign/ProLayout/components/RightContent/index.tsx +0 -95
- package/template-design-pro/src/components/GDesign/ProLayout/components/RightContent/style.less +0 -90
- package/template-design-pro/src/components/GDesign/ProLayout/components/SettingDrawer/BlockCheckbox.tsx +0 -70
- package/template-design-pro/src/components/GDesign/ProLayout/components/SettingDrawer/LayoutSetting.tsx +0 -107
- package/template-design-pro/src/components/GDesign/ProLayout/components/SettingDrawer/ThemeColor.tsx +0 -68
- package/template-design-pro/src/components/GDesign/ProLayout/components/SettingDrawer/index.tsx +0 -346
- package/template-design-pro/src/components/GDesign/ProLayout/components/SiderMenu/BaseMenu.tsx +0 -224
- package/template-design-pro/src/components/GDesign/ProLayout/components/SiderMenu/SiderMenu.tsx +0 -224
- package/template-design-pro/src/components/GDesign/ProLayout/components/SiderMenu/index.tsx +0 -43
- package/template-design-pro/src/components/GDesign/ProLayout/components/SiderMenu/props.ts +0 -112
- package/template-design-pro/src/components/GDesign/ProLayout/components/SiderMenu/style.less +0 -262
- package/template-design-pro/src/components/GDesign/ProLayout/components/SiderMenu/typings.ts +0 -44
- package/template-design-pro/src/components/GDesign/ProLayout/default.less +0 -2
- package/template-design-pro/src/components/GDesign/ProLayout/defaultSettings.ts +0 -121
- package/template-design-pro/src/components/GDesign/ProLayout/hooks/context/index.ts +0 -45
- package/template-design-pro/src/components/GDesign/ProLayout/index.ts +0 -43
- package/template-design-pro/src/components/GDesign/ProLayout/props.ts +0 -57
- package/template-design-pro/src/components/GDesign/ProLayout/style.less +0 -272
- package/template-design-pro/src/components/GDesign/ProLayout/typings.ts +0 -1
- package/template-design-pro/src/components/GDesign/ProLayout/utils/getMenuData.ts +0 -31
- package/template-design-pro/src/components/GDesign/ProLayout/utils/index.ts +0 -94
- package/template-design-pro/src/components/GDesign/ProLayout/utils/isImg/index.ts +0 -6
- package/template-design-pro/src/components/GDesign/ProLayout/utils/isUrl/index.ts +0 -5
- package/template-design-pro/src/components/GDesign/Result/index.tsx +0 -142
- package/template-design-pro/src/components/GDesign/Result/style.less +0 -140
- package/template-design-pro/src/components/GDesign/Scrollbars/components/Bar/index.tsx +0 -56
- package/template-design-pro/src/components/GDesign/Scrollbars/components/Bar/props.ts +0 -23
- package/template-design-pro/src/components/GDesign/Scrollbars/components/Thumb/index.tsx +0 -164
- package/template-design-pro/src/components/GDesign/Scrollbars/components/Thumb/props.ts +0 -11
- package/template-design-pro/src/components/GDesign/Scrollbars/context.ts +0 -10
- package/template-design-pro/src/components/GDesign/Scrollbars/index.tsx +0 -200
- package/template-design-pro/src/components/GDesign/Scrollbars/props.ts +0 -65
- package/template-design-pro/src/components/GDesign/Scrollbars/style.less +0 -85
- package/template-design-pro/src/components/GDesign/Scrollbars/util.ts +0 -40
- package/template-design-pro/src/components/GDesign/utils/index.ts +0 -7
- package/template-design-pro/src/components/PageLoading/index.tsx +0 -44
- package/template-design-pro/src/components/PageTransition/index.vue +0 -98
- package/template-design-pro/src/components/index.ts +0 -6
- package/template-design-pro/src/core/ant-design/index.ts +0 -14
- package/template-design-pro/src/core/gx-admin-design/index.ts +0 -7
- package/template-design-pro/src/core/gx-admin-directives/index.ts +0 -8
- package/template-design-pro/src/core/gx-admin-directives/permission.ts +0 -28
- package/template-design-pro/src/core/gx-design/index.ts +0 -7
- package/template-design-pro/src/core/gx-pro-design/index.ts +0 -10
- package/template-design-pro/src/core/index.ts +0 -27
- package/template-design-pro/src/design/ant-design/index.less +0 -4
- package/template-design-pro/src/design/ant-design/layout.less +0 -29
- package/template-design-pro/src/design/ant-design/menu.less +0 -55
- package/template-design-pro/src/design/ant-design/table.less +0 -67
- package/template-design-pro/src/design/ant-design/tooltip.less +0 -13
- package/template-design-pro/src/design/color.less +0 -1
- package/template-design-pro/src/design/config.less +0 -5
- package/template-design-pro/src/design/index.less +0 -41
- package/template-design-pro/src/design/mixin.less +0 -66
- package/template-design-pro/src/design/normalize.less +0 -390
- package/template-design-pro/src/global.less +0 -15
- package/template-design-pro/src/hooks/core/index.ts +0 -3
- package/template-design-pro/src/hooks/core/useRequest/index.ts +0 -70
- package/template-design-pro/src/hooks/core/useRequest/typings.ts +0 -0
- package/template-design-pro/src/hooks/event/index.ts +0 -3
- package/template-design-pro/src/hooks/event/useClipboard.ts +0 -14
- package/template-design-pro/src/hooks/system/index.ts +0 -5
- package/template-design-pro/src/hooks/system/useDict.ts +0 -62
- package/template-design-pro/src/hooks/system/usePermissions.ts +0 -39
- package/template-design-pro/src/hooks/typings.ts +0 -17
- package/template-design-pro/src/layout/BasicLayout.vue +0 -104
- package/template-design-pro/src/layout/BlankLayout.vue +0 -5
- package/template-design-pro/src/layout/ContentView.vue +0 -76
- package/template-design-pro/src/layout/IframeView.vue +0 -1
- package/template-design-pro/src/layout/UserLayout.vue +0 -7
- package/template-design-pro/src/main.ts +0 -34
- package/template-design-pro/src/plugins/index.ts +0 -3
- package/template-design-pro/src/router/guard/index.ts +0 -84
- package/template-design-pro/src/router/guard/permissions.ts +0 -73
- package/template-design-pro/src/router/guard/stateGuard.ts +0 -11
- package/template-design-pro/src/router/helper/routeHelper.ts +0 -244
- package/template-design-pro/src/router/helper/utils.ts +0 -19
- package/template-design-pro/src/router/index.ts +0 -30
- package/template-design-pro/src/router/routes/index.ts +0 -85
- package/template-design-pro/src/router/routes/modules/workplace.ts +0 -19
- package/template-design-pro/src/services/common/index.ts +0 -11
- package/template-design-pro/src/services/controller/router.ts +0 -10
- package/template-design-pro/src/services/controller/user.ts +0 -35
- package/template-design-pro/src/services/system/dictData.ts +0 -10
- package/template-design-pro/src/services/system/notices.ts +0 -9
- package/template-design-pro/src/store/index.ts +0 -32
- package/template-design-pro/src/store/modules/dict.ts +0 -27
- package/template-design-pro/src/store/modules/permission.ts +0 -19
- package/template-design-pro/src/store/modules/routes.ts +0 -110
- package/template-design-pro/src/store/modules/settings.ts +0 -102
- package/template-design-pro/src/store/modules/tabsRouter.ts +0 -73
- package/template-design-pro/src/store/modules/user.ts +0 -153
- package/template-design-pro/src/utils/accessToken.ts +0 -93
- package/template-design-pro/src/utils/crypto.ts +0 -39
- package/template-design-pro/src/utils/env.ts +0 -52
- package/template-design-pro/src/utils/fetchFile.ts +0 -79
- package/template-design-pro/src/utils/index.ts +0 -127
- package/template-design-pro/src/utils/pageTitle.ts +0 -17
- package/template-design-pro/src/utils/request/XHR.ts +0 -131
- package/template-design-pro/src/utils/request/axiosCancel.ts +0 -60
- package/template-design-pro/src/utils/request/checkStatus.ts +0 -26
- package/template-design-pro/src/utils/request/index.ts +0 -145
- package/template-design-pro/src/utils/request/typings.ts +0 -114
- package/template-design-pro/src/utils/storage.ts +0 -194
- package/template-design-pro/src/utils/uploadFile.ts +0 -26
- package/template-design-pro/src/utils/util.ts +0 -278
- package/template-design-pro/src/utils/validate.ts +0 -221
- package/template-design-pro/src/views/Iframe/index.vue +0 -76
- package/template-design-pro/src/views/MenuOne/index.vue +0 -15
- package/template-design-pro/src/views/MenuTwo/index.vue +0 -13
- package/template-design-pro/src/views/exception/403/index.vue +0 -9
- package/template-design-pro/src/views/exception/404/index.vue +0 -9
- package/template-design-pro/src/views/user/login/index.vue +0 -110
- package/template-design-pro/src/views/user/login/style.less +0 -38
- package/template-design-pro/stylelint.config.js +0 -106
- package/template-design-pro/tests/__mocks__/fileMock.ts +0 -1
- package/template-design-pro/tests/__mocks__/styleMock.ts +0 -1
- package/template-design-pro/tests/__mocks__/workerMock.ts +0 -5
- package/template-design-pro/tests/server/README.md +0 -15
- package/template-design-pro/tests/server/controller/FileController.ts +0 -18
- package/template-design-pro/tests/server/controller/UserController.ts +0 -15
- package/template-design-pro/tests/server/ecosystem.config.js +0 -18
- package/template-design-pro/tests/server/index.ts +0 -63
- package/template-design-pro/tests/server/nodemon.json +0 -8
- package/template-design-pro/tests/server/package.json +0 -36
- package/template-design-pro/tests/server/routes.ts +0 -23
- package/template-design-pro/tests/server/service/FileService.ts +0 -54
- package/template-design-pro/tests/server/service/UserService.ts +0 -25
- package/template-design-pro/tests/server/tsconfig.json +0 -15
- package/template-design-pro/tests/server/utils.ts +0 -9
- package/template-design-pro/tests/server/yarn.lock +0 -2955
- package/template-design-pro/tests/test.spec.ts +0 -16
- package/template-design-pro/tsconfig.json +0 -47
- package/template-design-pro/types/auto-imports.d.ts +0 -61
- package/template-design-pro/types/config.d.ts +0 -100
- package/template-design-pro/types/global.d.ts +0 -103
- package/template-design-pro/types/gx-components.d.ts +0 -24
- package/template-design-pro/types/index.d.ts +0 -13
- package/template-design-pro/types/mock.d.ts +0 -23
- package/template-design-pro/types/module.d.ts +0 -16
- package/template-design-pro/types/response.d.ts +0 -15
- package/template-design-pro/types/route.d.ts +0 -89
- package/template-design-pro/vite.config.ts +0 -136
- package/template-design-pro/yarn.lock +0 -9697
package/package.json
CHANGED
package/src/cli.js
CHANGED
@@ -11,7 +11,7 @@ const FRAMEWORKS = [
|
|
11
11
|
color: red
|
12
12
|
},
|
13
13
|
{
|
14
|
-
name: 'design-
|
14
|
+
name: 'gx-design-thin',
|
15
15
|
color: blue
|
16
16
|
},
|
17
17
|
{
|
@@ -48,7 +48,7 @@ async function promptForMissingOptions(options) {
|
|
48
48
|
type: options.projectName ? null : 'text',
|
49
49
|
name: 'projectName',
|
50
50
|
message: reset('Project name:'),
|
51
|
-
initial: defaultTargetDir
|
51
|
+
initial: defaultTargetDir
|
52
52
|
},
|
53
53
|
{
|
54
54
|
type: options.template && TEMPLATES.includes(options.template) ? null : 'select',
|
@@ -56,7 +56,7 @@ async function promptForMissingOptions(options) {
|
|
56
56
|
message:
|
57
57
|
typeof options.template === 'string' && !TEMPLATES.includes(options.template)
|
58
58
|
? reset(
|
59
|
-
`"${options.template}" isn't a valid template. Please choose from below:
|
59
|
+
`"${options.template}" isn't a valid template. Please choose from below: `
|
60
60
|
)
|
61
61
|
: reset('Select a Template:'),
|
62
62
|
choices: FRAMEWORKS.map((framework) => {
|
package/src/main.js
CHANGED
@@ -16,6 +16,10 @@ const gitRepositoryList = [
|
|
16
16
|
{
|
17
17
|
name: 'gx-design-pro',
|
18
18
|
git: 'https://gitee.com/gx12358/vue-antd-admin.git#v2'
|
19
|
+
},
|
20
|
+
{
|
21
|
+
name: 'gx-design-thin',
|
22
|
+
git: 'https://gitee.com/gx12358/gx-admin-thin.git'
|
19
23
|
}
|
20
24
|
]
|
21
25
|
|
@@ -92,13 +96,13 @@ export async function createProject(options) {
|
|
92
96
|
// 下载git代码
|
93
97
|
download(`direct:${downloadGit.git}`, root, { clone: true }, async function(err) {
|
94
98
|
if (err) {
|
95
|
-
console.log(err)
|
96
99
|
spinner.error({ text: '下载失败' })
|
97
100
|
} else {
|
98
101
|
await editPackageJson(root, options.projectName || getProjectName())
|
99
102
|
spinner.success({
|
100
103
|
text: '项目创建成功,请依次执行以下命令'
|
101
104
|
})
|
105
|
+
fs.
|
102
106
|
doneLog(cwd, root)
|
103
107
|
}
|
104
108
|
})
|
@@ -125,6 +129,7 @@ export async function createProject(options) {
|
|
125
129
|
)
|
126
130
|
|
127
131
|
await tasks.run()
|
132
|
+
|
128
133
|
await editPackageJson(root)
|
129
134
|
doneLog(cwd, root)
|
130
135
|
}
|
File without changes
|
@@ -11,7 +11,5 @@ declare module '@vue/runtime-core' {
|
|
11
11
|
RouterView: typeof import('vue-router')['RouterView']
|
12
12
|
VanButton: typeof import('vant/es')['Button']
|
13
13
|
VanCell: typeof import('vant/es')['Cell']
|
14
|
-
VanSwipe: typeof import('vant/es')['Swipe']
|
15
|
-
VanSwipeItem: typeof import('vant/es')['SwipeItem']
|
16
14
|
}
|
17
15
|
}
|
@@ -5,8 +5,8 @@ declare global {
|
|
5
5
|
pkg: {
|
6
6
|
name: string;
|
7
7
|
version: string;
|
8
|
-
dependencies:
|
9
|
-
devDependencies:
|
8
|
+
dependencies: RecordType;
|
9
|
+
devDependencies: RecordType;
|
10
10
|
};
|
11
11
|
lastBuildTime: string;
|
12
12
|
}
|
@@ -19,7 +19,7 @@ declare global {
|
|
19
19
|
|
20
20
|
declare type PropType<T> = VuePropType<T>;
|
21
21
|
|
22
|
-
declare type RecordType<T = string, K = any> = Record<
|
22
|
+
declare type RecordType<T = string, K = any> = Record<T, K>;
|
23
23
|
|
24
24
|
declare interface ViteEnv {
|
25
25
|
VITE_USE_MODE: string;
|
@@ -5,6 +5,7 @@ import dayjs from 'dayjs'
|
|
5
5
|
|
6
6
|
import { configManualChunk } from './build/optimizer'
|
7
7
|
import { createVitePlugins } from './build/plugin'
|
8
|
+
import { generateModifyVars } from './build/generateModifyVars'
|
8
9
|
|
9
10
|
import pkg from './package.json'
|
10
11
|
|
@@ -52,7 +53,7 @@ export default ({ mode, command }: ConfigEnv): UserConfig => {
|
|
52
53
|
// The boolean type read by loadEnv is a string. This function can be converted to boolean type
|
53
54
|
const viteEnv = wrapperEnv(env)
|
54
55
|
|
55
|
-
const { VITE_BASE_URL } = viteEnv
|
56
|
+
const { VITE_BASE_URL, VITE_DROP_CONSOLE } = viteEnv
|
56
57
|
|
57
58
|
const isBuild = command === 'build'
|
58
59
|
|
@@ -85,15 +86,12 @@ export default ({ mode, command }: ConfigEnv): UserConfig => {
|
|
85
86
|
__INTLIFY_PROD_DEVTOOLS__: false,
|
86
87
|
__APP_INFO__: JSON.stringify(__APP_INFO__)
|
87
88
|
},
|
89
|
+
esbuild: {
|
90
|
+
drop: VITE_DROP_CONSOLE ? [ 'console', 'debugger' ] : []
|
91
|
+
},
|
88
92
|
build: {
|
89
93
|
assetsDir: 'assets',
|
90
|
-
target: 'es2015',
|
91
|
-
cssTarget: 'chrome80',
|
92
|
-
reportCompressedSize: false,
|
93
94
|
chunkSizeWarningLimit: 2500,
|
94
|
-
commonjsOptions: {
|
95
|
-
ignoreTryCatch: false
|
96
|
-
},
|
97
95
|
rollupOptions: {
|
98
96
|
output: {
|
99
97
|
manualChunks: configManualChunk
|
@@ -106,6 +104,7 @@ export default ({ mode, command }: ConfigEnv): UserConfig => {
|
|
106
104
|
},
|
107
105
|
preprocessorOptions: {
|
108
106
|
less: {
|
107
|
+
modifyVars: generateModifyVars(),
|
109
108
|
javascriptEnabled: true
|
110
109
|
}
|
111
110
|
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
root = true
|
2
|
-
|
3
|
-
[*]
|
4
|
-
charset=utf-8
|
5
|
-
end_of_line=lf
|
6
|
-
insert_final_newline=true
|
7
|
-
indent_style=space
|
8
|
-
indent_size=2
|
9
|
-
max_line_length = 100
|
10
|
-
|
11
|
-
[*.{yml,yaml,json}]
|
12
|
-
indent_style = space
|
13
|
-
indent_size = 2
|
14
|
-
|
15
|
-
[*.md]
|
16
|
-
trim_trailing_whitespace = false
|
17
|
-
|
18
|
-
[Makefile]
|
19
|
-
indent_style = tab
|
package/template-design-pro/.env
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# 实际执行环境 development
|
2
|
-
VITE_NODE_ENV= development
|
3
|
-
|
4
|
-
# environment 代码环境
|
5
|
-
VITE_USE_MODE = development
|
6
|
-
|
7
|
-
# 是否开启mock
|
8
|
-
VITE_USE_MOCK = true
|
9
|
-
|
10
|
-
# 是否删除console
|
11
|
-
VITE_DROP_CONSOLE = false
|
12
|
-
|
13
|
-
# api前缀
|
14
|
-
VITE_BASE_URL=/api
|
15
|
-
|
16
|
-
# oss信息
|
17
|
-
VITE_OSS_BUCKET = oss-*
|
18
|
-
VITE_OSS_ORIGIN = oss-cn-*
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# 实际执行环境 production
|
2
|
-
VITE_NODE_ENV= production
|
3
|
-
|
4
|
-
# environment 代码环境
|
5
|
-
VITE_USE_MODE = production
|
6
|
-
|
7
|
-
# 是否开启mock
|
8
|
-
VITE_USE_MOCK = true
|
9
|
-
|
10
|
-
# 是否删除console
|
11
|
-
VITE_DROP_CONSOLE = false
|
12
|
-
|
13
|
-
# Whether to enable gzip or brotli compression
|
14
|
-
# Optional: gzip | brotli | none
|
15
|
-
# If you need multiple forms, you can use `,` to separate
|
16
|
-
VITE_BUILD_COMPRESS = 'none'
|
17
|
-
|
18
|
-
# 使用压缩时是否删除源文件,默认为false
|
19
|
-
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
20
|
-
|
21
|
-
# 是否使用pwa
|
22
|
-
VITE_USE_PWA = false
|
23
|
-
|
24
|
-
# 是否为打包后的文件提供传统浏览器兼容性支持
|
25
|
-
VITE_LEGACY = false
|
26
|
-
|
27
|
-
# api前缀
|
28
|
-
VITE_BASE_URL=/mock-server
|
29
|
-
|
30
|
-
# oss信息
|
31
|
-
VITE_OSS_BUCKET = oss-*
|
32
|
-
VITE_OSS_ORIGIN = oss-cn-*
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# 实际执行环境 test
|
2
|
-
VITE_NODE_ENV= test
|
3
|
-
|
4
|
-
# environment 代码环境
|
5
|
-
VITE_USE_MODE = test
|
6
|
-
|
7
|
-
# 是否开启mock
|
8
|
-
VITE_USE_MOCK = true
|
9
|
-
|
10
|
-
# 是否删除console
|
11
|
-
VITE_DROP_CONSOLE = false
|
12
|
-
|
13
|
-
# Whether to enable gzip or brotli compression
|
14
|
-
# Optional: gzip | brotli | none
|
15
|
-
# If you need multiple forms, you can use `,` to separate
|
16
|
-
VITE_BUILD_COMPRESS = 'none'
|
17
|
-
|
18
|
-
# 使用压缩时是否删除源文件,默认为false
|
19
|
-
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
20
|
-
|
21
|
-
# 是否使用pwa
|
22
|
-
VITE_USE_PWA = false
|
23
|
-
|
24
|
-
# 是否为打包后的文件提供传统浏览器兼容性支持
|
25
|
-
VITE_LEGACY = false
|
26
|
-
|
27
|
-
# api前缀
|
28
|
-
VITE_BASE_URL=/mock-server
|
29
|
-
|
30
|
-
# oss信息
|
31
|
-
VITE_OSS_BUCKET = oss-*
|
32
|
-
VITE_OSS_ORIGIN = oss-cn-*
|
@@ -1,20 +0,0 @@
|
|
1
|
-
VITE_NODE_ENV=production
|
2
|
-
# Whether to open mock
|
3
|
-
VITE_USE_MOCK = true
|
4
|
-
|
5
|
-
# Delete console
|
6
|
-
VITE_DROP_CONSOLE = true
|
7
|
-
|
8
|
-
# Whether to enable gzip or brotli compression
|
9
|
-
# Optional: gzip | brotli | none
|
10
|
-
# If you need multiple forms, you can use `,` to separate
|
11
|
-
VITE_BUILD_COMPRESS = 'none'
|
12
|
-
|
13
|
-
# Whether to delete origin files when using compress, default false
|
14
|
-
VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
|
15
|
-
|
16
|
-
# use pwa
|
17
|
-
VITE_USE_PWA = false
|
18
|
-
|
19
|
-
# Is it compatible with older browsers
|
20
|
-
VITE_LEGACY = false
|
@@ -1,64 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
root: true,
|
3
|
-
env: {
|
4
|
-
browser: true,
|
5
|
-
node: true,
|
6
|
-
es6: true,
|
7
|
-
},
|
8
|
-
parser: 'vue-eslint-parser',
|
9
|
-
parserOptions: {
|
10
|
-
parser: '@typescript-eslint/parser',
|
11
|
-
ecmaVersion: 2020,
|
12
|
-
sourceType: 'module',
|
13
|
-
jsxPragma: 'React',
|
14
|
-
ecmaFeatures: {
|
15
|
-
jsx: true,
|
16
|
-
},
|
17
|
-
},
|
18
|
-
extends: [
|
19
|
-
'plugin:vue/vue3-recommended',
|
20
|
-
'plugin:@typescript-eslint/recommended'
|
21
|
-
],
|
22
|
-
rules: {
|
23
|
-
'vue/script-setup-uses-vars': 'error',
|
24
|
-
'@typescript-eslint/ban-ts-ignore': 'off',
|
25
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
26
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
27
|
-
'@typescript-eslint/no-var-requires': 'off',
|
28
|
-
'@typescript-eslint/no-empty-function': 'off',
|
29
|
-
'vue/custom-event-name-casing': 'off',
|
30
|
-
'no-use-before-define': 'off',
|
31
|
-
'@typescript-eslint/no-use-before-define': 'off',
|
32
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
33
|
-
'@typescript-eslint/ban-types': 'off',
|
34
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
35
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
36
|
-
'@typescript-eslint/no-unused-vars': [
|
37
|
-
'error',
|
38
|
-
{
|
39
|
-
argsIgnorePattern: '^_',
|
40
|
-
varsIgnorePattern: '^_',
|
41
|
-
},
|
42
|
-
],
|
43
|
-
'no-unused-vars': [
|
44
|
-
'error',
|
45
|
-
{
|
46
|
-
argsIgnorePattern: '^_',
|
47
|
-
varsIgnorePattern: '^_',
|
48
|
-
},
|
49
|
-
],
|
50
|
-
'space-before-function-paren': 'off',
|
51
|
-
|
52
|
-
'vue/attributes-order': 'off',
|
53
|
-
'vue/one-component-per-file': 'off',
|
54
|
-
'vue/html-closing-bracket-newline': 'off',
|
55
|
-
'vue/max-attributes-per-line': 'off',
|
56
|
-
'vue/multiline-html-element-content-newline': 'off',
|
57
|
-
'vue/singleline-html-element-content-newline': 'off',
|
58
|
-
'vue/attribute-hyphenation': 'off',
|
59
|
-
'vue/require-default-prop': 'off',
|
60
|
-
'vue/require-explicit-emits': 'off',
|
61
|
-
'vue/html-self-closing': 0,
|
62
|
-
'vue/multi-word-component-names': 'off',
|
63
|
-
},
|
64
|
-
};
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# test directories
|
2
|
-
__tests__
|
3
|
-
test
|
4
|
-
tests
|
5
|
-
powered-test
|
6
|
-
|
7
|
-
# asset directories
|
8
|
-
docs
|
9
|
-
doc
|
10
|
-
website
|
11
|
-
images
|
12
|
-
assets
|
13
|
-
|
14
|
-
# examples
|
15
|
-
example
|
16
|
-
examples
|
17
|
-
|
18
|
-
# code coverage directories
|
19
|
-
coverage
|
20
|
-
.nyc_output
|
21
|
-
|
22
|
-
# build scripts
|
23
|
-
Makefile
|
24
|
-
Gulpfile.js
|
25
|
-
Gruntfile.js
|
26
|
-
|
27
|
-
# configs
|
28
|
-
appveyor.yml
|
29
|
-
circle.yml
|
30
|
-
codeship-services.yml
|
31
|
-
codeship-steps.yml
|
32
|
-
wercker.yml
|
33
|
-
.tern-project
|
34
|
-
.gitattributes
|
35
|
-
.editorconfig
|
36
|
-
.*ignore
|
37
|
-
.eslintrc
|
38
|
-
.jshintrc
|
39
|
-
.flowconfig
|
40
|
-
.documentup.json
|
41
|
-
.yarn-metadata.json
|
42
|
-
.travis.yml
|
43
|
-
|
44
|
-
# misc
|
45
|
-
*.md
|
46
|
-
|
47
|
-
!istanbul-reports/lib/html/assets
|
48
|
-
!istanbul-api/node_modules/istanbul-reports/lib/html/assets
|
@@ -1,21 +0,0 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2021 gx12358
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
@@ -1,111 +0,0 @@
|
|
1
|
-
<div align="center"> <a href="https://gitee.com/gx12358/vite-admin-pro"> <img alt="VbenAdmin Logo" width="200" height="200" src="https://zbbf9-hw.ahtv.cn/ahtv-obs/20210811/d5b6f8d7-b759-243d-b8f3-906a6b8570bf.png"> </a> <br> <br>
|
2
|
-
|
3
|
-
<h1>GX Pro Admin(Ant Design Vue)</h1>
|
4
|
-
</div>
|
5
|
-
|
6
|
-
## 简介
|
7
|
-
|
8
|
-
GX Pro Admin 是一个免费开源的中后台模版。使用了最新的`vue3.0+`,`vite2`,`TypeScript`, `Ant Design Vue3.0+`等主流技术开发,开箱即用的中后台前端解决方案,也可用于学习参考。
|
9
|
-
|
10
|
-
## 特性
|
11
|
-
|
12
|
-
- **最新技术栈**:使用 Vue3/vite2 等前端前沿技术开发
|
13
|
-
- **TypeScript**: 应用程序级 JavaScript 的语言
|
14
|
-
- **主题**:可配置的主题
|
15
|
-
- **Mock 数据** 内置 Mock 数据方案
|
16
|
-
- **权限** 内置完善的动态路由权限生成方案
|
17
|
-
- **组件** 二次封装了多个常用的组件
|
18
|
-
|
19
|
-
## 预览
|
20
|
-
|
21
|
-
- [🚀 pro 版演示地址](http://121.36.16.172:9000/gx.pro.admin)
|
22
|
-
|
23
|
-
测试账号: admin/123456
|
24
|
-
|
25
|
-
## 准备
|
26
|
-
|
27
|
-
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
|
28
|
-
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
|
29
|
-
- [Vue3](https://v3.vuejs.org/) - 熟悉 Vue 基础语法
|
30
|
-
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
|
31
|
-
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
|
32
|
-
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
|
33
|
-
- [Ant-Design-Vue](https://next.antdv.com/components/overview-cn/) - ui 基本使用
|
34
|
-
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
|
35
|
-
|
36
|
-
## 安装使用
|
37
|
-
|
38
|
-
- 获取项目代码
|
39
|
-
|
40
|
-
```bash
|
41
|
-
git clone https://gitee.com/gx12358/vite-admin-pro
|
42
|
-
```
|
43
|
-
|
44
|
-
- 安装依赖
|
45
|
-
|
46
|
-
```bash
|
47
|
-
cd gx-admin-pro
|
48
|
-
|
49
|
-
yarn install
|
50
|
-
|
51
|
-
```
|
52
|
-
|
53
|
-
- 运行
|
54
|
-
|
55
|
-
```bash
|
56
|
-
yarn serve
|
57
|
-
```
|
58
|
-
|
59
|
-
- 打包
|
60
|
-
|
61
|
-
```bash
|
62
|
-
yarn build
|
63
|
-
```
|
64
|
-
|
65
|
-
## Git 贡献提交规范
|
66
|
-
|
67
|
-
- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
|
68
|
-
|
69
|
-
- `feat` 增加新功能
|
70
|
-
- `fix` 修复问题/BUG
|
71
|
-
- `style` 代码风格相关无影响运行结果的
|
72
|
-
- `perf` 优化/性能提升
|
73
|
-
- `refactor` 重构
|
74
|
-
- `revert` 撤销修改
|
75
|
-
- `test` 测试相关
|
76
|
-
- `docs` 文档/注释
|
77
|
-
- `chore` 依赖更新/脚手架配置修改等
|
78
|
-
- `workflow` 工作流改进
|
79
|
-
- `ci` 持续集成
|
80
|
-
- `types` 类型定义文件更改
|
81
|
-
- `wip` 开发中
|
82
|
-
|
83
|
-
## 浏览器支持
|
84
|
-
|
85
|
-
本地开发推荐使用`Chrome 80+` 浏览器
|
86
|
-
|
87
|
-
支持现代浏览器, 不支持 IE
|
88
|
-
|
89
|
-
## 相关仓库
|
90
|
-
|
91
|
-
如果这些插件对你有帮助,可以给一个 star 支持下
|
92
|
-
|
93
|
-
- [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩
|
94
|
-
- [vite-plugin-style-import](https://github.com/anncwb/vite-plugin-style-import) - 用于组件库样式按需引入
|
95
|
-
- [vite-plugin-imagemin](https://github.com/anncwb/vite-plugin-imagemin) - 用于打包压缩图片资源
|
96
|
-
- [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件
|
97
|
-
- [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图
|
98
|
-
|
99
|
-
## 维护者
|
100
|
-
|
101
|
-
[@gx12358](https://gitee.com/gx12358)
|
102
|
-
|
103
|
-
## 交流
|
104
|
-
|
105
|
-
`GX-ADMIN-PRO` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。
|
106
|
-
|
107
|
-
- QQ 群 `871430530`
|
108
|
-
|
109
|
-
## License
|
110
|
-
|
111
|
-
[MIT © gx12358-2021](./LICENSE)
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { getThemeVariables } from 'ant-design-vue/dist/theme'
|
2
|
-
import { resolve } from 'path'
|
3
|
-
import config from '../../config/config'
|
4
|
-
|
5
|
-
export function generateModifyVars(viteEnv: ViteEnv) {
|
6
|
-
const { VITE_USE_THEME } = viteEnv
|
7
|
-
|
8
|
-
const modifyVars = getThemeVariables()
|
9
|
-
|
10
|
-
const modifyVarsParams = {
|
11
|
-
...modifyVars,
|
12
|
-
hack: `${modifyVars.hack} @import (reference) "${resolve('src/design/config.less')}";`
|
13
|
-
}
|
14
|
-
|
15
|
-
if (!VITE_USE_THEME) modifyVarsParams['primary-color'] = config.theme.primaryColor
|
16
|
-
|
17
|
-
return modifyVarsParams
|
18
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Get the configuration file variable name
|
3
|
-
* @param env
|
4
|
-
*/
|
5
|
-
import config from '../config/config'
|
6
|
-
|
7
|
-
const { shortName } = config.defaultSettings
|
8
|
-
|
9
|
-
export const getConfigFileName = (_: RecordType) => {
|
10
|
-
return `__PRODUCTION__${shortName || '__APP'}__CONF__`
|
11
|
-
.toUpperCase()
|
12
|
-
.replace(/\s/g, '')
|
13
|
-
}
|