create-bubbles 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +1 -1
  3. package/template-vp-monorepo-react-nestjs/.oxfmtrc.jsonc +8 -0
  4. package/template-vp-monorepo-react-nestjs/.oxlintrc.jsonc +3 -0
  5. package/template-vp-monorepo-react-nestjs/.specs//351/234/200/346/261/202.md +5 -0
  6. package/template-vp-monorepo-react-nestjs/.vite-hooks/commit-msg +1 -0
  7. package/template-vp-monorepo-react-nestjs/.vite-hooks/pre-commit +1 -0
  8. package/template-vp-monorepo-react-nestjs/.vscode/extensions.json +3 -0
  9. package/template-vp-monorepo-react-nestjs/README.md +29 -0
  10. package/template-vp-monorepo-react-nestjs/apps/service/.oxlintrc.jsonc +3 -0
  11. package/template-vp-monorepo-react-nestjs/apps/web/.env +1 -0
  12. package/template-vp-monorepo-react-nestjs/apps/web/.oxlintrc.jsonc +4 -0
  13. package/{template-vue-vite-biome → template-vp-monorepo-react-nestjs/apps/web}/index.html +4 -4
  14. package/template-vp-monorepo-react-nestjs/apps/web/package.json +39 -0
  15. package/template-vp-monorepo-react-nestjs/apps/web/public/favicon.svg +1 -0
  16. package/template-vp-monorepo-react-nestjs/apps/web/public/icons.svg +24 -0
  17. package/template-vp-monorepo-react-nestjs/apps/web/src/App.tsx +24 -0
  18. package/template-vp-monorepo-react-nestjs/apps/web/src/assets/hero.png +0 -0
  19. package/template-vp-monorepo-react-nestjs/apps/web/src/assets/react.svg +1 -0
  20. package/template-vp-monorepo-react-nestjs/apps/web/src/assets/vite.svg +1 -0
  21. package/template-vp-monorepo-react-nestjs/apps/web/src/components/Loading/PageLoading.tsx +11 -0
  22. package/template-vp-monorepo-react-nestjs/apps/web/src/main.tsx +5 -0
  23. package/template-vp-monorepo-react-nestjs/apps/web/src/pages/home/index.tsx +17 -0
  24. package/template-vp-monorepo-react-nestjs/apps/web/src/router/index.tsx +25 -0
  25. package/template-vp-monorepo-react-nestjs/apps/web/src/styles/index.css +7 -0
  26. package/template-vp-monorepo-react-nestjs/apps/web/src/types/auto-imports.d.ts +58 -0
  27. package/{template-vue-vite-biome → template-vp-monorepo-react-nestjs/apps/web}/tsconfig.json +5 -9
  28. package/template-vp-monorepo-react-nestjs/apps/web/vite.config.ts +32 -0
  29. package/template-vp-monorepo-react-nestjs/commitlint.config.js +0 -0
  30. package/template-vp-monorepo-react-nestjs/package.json +20 -0
  31. package/template-vp-monorepo-react-nestjs/packages/utils/README.md +23 -0
  32. package/template-vp-monorepo-react-nestjs/packages/utils/package.json +39 -0
  33. package/template-vp-monorepo-react-nestjs/packages/utils/src/index.ts +3 -0
  34. package/template-vp-monorepo-react-nestjs/packages/utils/tests/index.test.ts +6 -0
  35. package/template-vp-monorepo-react-nestjs/packages/utils/tsconfig.json +20 -0
  36. package/template-vp-monorepo-react-nestjs/packages/utils/tsdown.config.ts +9 -0
  37. package/template-vp-monorepo-react-nestjs/packages/utils/vite.config.ts +7 -0
  38. package/template-vp-monorepo-react-nestjs/pnpm-workspace.yaml +23 -0
  39. package/template-vp-monorepo-react-nestjs/tsconfig.json +9 -0
  40. package/template-vp-monorepo-react-nestjs/vite.config.ts +8 -0
  41. package/template-vp-react/.vscode/settings.json +11 -0
  42. package/template-vp-react/package.json +10 -10
  43. package/template-vp-react-shadcn/.env +1 -0
  44. package/template-vp-react-shadcn/.oxfmtrc.jsonc +8 -0
  45. package/template-vp-react-shadcn/.oxlintrc.jsonc +3 -0
  46. package/template-vp-react-shadcn/.vite-hooks/commit-msg +1 -0
  47. package/template-vp-react-shadcn/.vite-hooks/pre-commit +1 -0
  48. package/template-vp-react-shadcn/.vscode/extensions.json +3 -0
  49. package/template-vp-react-shadcn/.vscode/settings.json +12 -0
  50. package/template-vp-react-shadcn/agents.md +44 -0
  51. package/template-vp-react-shadcn/commitlint.config.js +1 -0
  52. package/template-vp-react-shadcn/components.json +25 -0
  53. package/template-vp-react-shadcn/index.html +13 -0
  54. package/template-vp-react-shadcn/package.json +56 -0
  55. package/template-vp-react-shadcn/public/favicon.svg +1 -0
  56. package/template-vp-react-shadcn/public/icons.svg +24 -0
  57. package/template-vp-react-shadcn/src/App.tsx +24 -0
  58. package/template-vp-react-shadcn/src/assets/hero.png +0 -0
  59. package/template-vp-react-shadcn/src/assets/react.svg +1 -0
  60. package/template-vp-react-shadcn/src/assets/vite.svg +1 -0
  61. package/template-vp-react-shadcn/src/components/Loading/PageLoading.tsx +11 -0
  62. package/template-vp-react-shadcn/src/components/Player/VideoJS/index.tsx +163 -0
  63. package/template-vp-react-shadcn/src/components/Player/index.ts +7 -0
  64. package/template-vp-react-shadcn/src/components/ui/button.tsx +67 -0
  65. package/template-vp-react-shadcn/src/components/ui/sonner.tsx +43 -0
  66. package/template-vp-react-shadcn/src/components/ui/spinner.tsx +17 -0
  67. package/template-vp-react-shadcn/src/hooks/.gitkeep +0 -0
  68. package/template-vp-react-shadcn/src/lib/utils.ts +6 -0
  69. package/template-vp-react-shadcn/src/main.tsx +5 -0
  70. package/template-vp-react-shadcn/src/pages/home/index.tsx +96 -0
  71. package/template-vp-react-shadcn/src/router/index.tsx +25 -0
  72. package/template-vp-react-shadcn/src/router/modules/.gitkeep +0 -0
  73. package/template-vp-react-shadcn/src/store/.gitkeep +0 -0
  74. package/template-vp-react-shadcn/src/styles/index.css +16 -0
  75. package/template-vp-react-shadcn/src/styles/shadcn.css +127 -0
  76. package/template-vp-react-shadcn/src/types/auto-imports.d.ts +58 -0
  77. package/template-vp-react-shadcn/src/utils/env/index.tsx +6 -0
  78. package/template-vp-react-shadcn/src/utils/request/alova-core/index.ts +276 -0
  79. package/template-vp-react-shadcn/src/utils/request/alova-core/utils.ts +24 -0
  80. package/template-vp-react-shadcn/src/utils/request/index.ts +48 -0
  81. package/template-vp-react-shadcn/src/utils/request/readme.md +176 -0
  82. package/template-vp-react-shadcn/tsconfig.json +32 -0
  83. package/template-vp-react-shadcn/vite.config.ts +35 -0
  84. package/template-vue-vite-eslint/package.json +29 -33
  85. package/template-vue-vite-eslint/src/main.ts +0 -1
  86. package/template-vue-vite-eslint/src/styles/index.scss +0 -3
  87. package/template-vue-vite-eslint/src/types/components.d.ts +0 -4
  88. package/template-vue-vite-eslint/src/utils/request/index.ts +4 -4
  89. package/template-vue-vite-eslint/vite.config.ts +2 -4
  90. package/template-vue-rsbuild-biome/.env +0 -5
  91. package/template-vue-rsbuild-biome/.env.development +0 -1
  92. package/template-vue-rsbuild-biome/.env.production +0 -1
  93. package/template-vue-rsbuild-biome/.prettierignore +0 -4
  94. package/template-vue-rsbuild-biome/.prettierrc +0 -18
  95. package/template-vue-rsbuild-biome/.vscode/settings.json +0 -13
  96. package/template-vue-rsbuild-biome/README.md +0 -29
  97. package/template-vue-rsbuild-biome/biome.json +0 -109
  98. package/template-vue-rsbuild-biome/index.html +0 -7
  99. package/template-vue-rsbuild-biome/lefthook.yml +0 -11
  100. package/template-vue-rsbuild-biome/package.json +0 -36
  101. package/template-vue-rsbuild-biome/rsbuild.config.ts +0 -41
  102. package/template-vue-rsbuild-biome/src/App.vue +0 -3
  103. package/template-vue-rsbuild-biome/src/index.ts +0 -13
  104. package/template-vue-rsbuild-biome/src/router/guard/index.tsx +0 -6
  105. package/template-vue-rsbuild-biome/src/router/guard/permissionGuard.ts +0 -8
  106. package/template-vue-rsbuild-biome/src/router/index.tsx +0 -14
  107. package/template-vue-rsbuild-biome/src/router/modules/index.tsx +0 -10
  108. package/template-vue-rsbuild-biome/src/store/index.ts +0 -7
  109. package/template-vue-rsbuild-biome/src/store/modules/user.ts +0 -17
  110. package/template-vue-rsbuild-biome/src/styles/index.css +0 -16
  111. package/template-vue-rsbuild-biome/src/types/auto-import.d.ts +0 -78
  112. package/template-vue-rsbuild-biome/src/types/components.d.ts +0 -15
  113. package/template-vue-rsbuild-biome/src/types/env.d.ts +0 -17
  114. package/template-vue-rsbuild-biome/src/utils/env.ts +0 -10
  115. package/template-vue-rsbuild-biome/src/utils/request/core/index.ts +0 -166
  116. package/template-vue-rsbuild-biome/src/utils/request/core/utils.ts +0 -38
  117. package/template-vue-rsbuild-biome/src/utils/request/index.ts +0 -39
  118. package/template-vue-rsbuild-biome/src/views/home/index.vue +0 -14
  119. package/template-vue-rsbuild-biome/tsconfig.json +0 -29
  120. package/template-vue-rsbuild-biome/uno.config.ts +0 -9
  121. package/template-vue-vite-biome/.env +0 -4
  122. package/template-vue-vite-biome/.env.development +0 -1
  123. package/template-vue-vite-biome/.env.production +0 -1
  124. package/template-vue-vite-biome/.gitlab-ci.yml +0 -84
  125. package/template-vue-vite-biome/.vscode/settings.json +0 -10
  126. package/template-vue-vite-biome/README.md +0 -3
  127. package/template-vue-vite-biome/biome.json +0 -109
  128. package/template-vue-vite-biome/commitlint.config.js +0 -1
  129. package/template-vue-vite-biome/lefthook.yml +0 -11
  130. package/template-vue-vite-biome/package.json +0 -50
  131. package/template-vue-vite-biome/public/vite.svg +0 -1
  132. package/template-vue-vite-biome/src/App.vue +0 -19
  133. package/template-vue-vite-biome/src/assets/icon/vue.svg +0 -1
  134. package/template-vue-vite-biome/src/components/Icon/svg-icon.vue +0 -29
  135. package/template-vue-vite-biome/src/layout/default/index.vue +0 -3
  136. package/template-vue-vite-biome/src/main.ts +0 -15
  137. package/template-vue-vite-biome/src/router/guard/index.ts +0 -7
  138. package/template-vue-vite-biome/src/router/guard/permissionGuard.ts +0 -13
  139. package/template-vue-vite-biome/src/router/index.ts +0 -17
  140. package/template-vue-vite-biome/src/router/modules/index.ts +0 -31
  141. package/template-vue-vite-biome/src/store/index.ts +0 -10
  142. package/template-vue-vite-biome/src/store/modules/user.ts +0 -17
  143. package/template-vue-vite-biome/src/styles/element-plus-variables.css +0 -4
  144. package/template-vue-vite-biome/src/styles/index.scss +0 -31
  145. package/template-vue-vite-biome/src/styles/variables.scss +0 -3
  146. package/template-vue-vite-biome/src/types/vite-env.d.ts +0 -13
  147. package/template-vue-vite-biome/src/utils/env.ts +0 -10
  148. package/template-vue-vite-biome/src/utils/request/core/index.ts +0 -166
  149. package/template-vue-vite-biome/src/utils/request/core/utils.ts +0 -38
  150. package/template-vue-vite-biome/src/utils/request/index.ts +0 -39
  151. package/template-vue-vite-biome/src/views/home/index.vue +0 -16
  152. package/template-vue-vite-biome/src/views/login/index.vue +0 -11
  153. package/template-vue-vite-biome/src/views/model/index.vue +0 -7
  154. package/template-vue-vite-biome/uno.config.ts +0 -10
  155. package/template-vue-vite-biome/vite.config.ts +0 -51
  156. package/template-vue-vite-eslint/.vscode/settings.json +0 -62
  157. package/template-vue-vite-eslint/src/styles/element-plus-variables.css +0 -3
  158. package/template-vue-vite-eslint/src/styles/plus-pro-components-variables.css +0 -3
  159. package/template-vue-vite-eslint/src/types/index.d.ts +0 -1
  160. /package/{template-vue-rsbuild-biome/public → template-vp-monorepo-react-nestjs/apps/web/src/router/modules}/.gitkeep +0 -0
  161. /package/{template-vue-vite-biome/src/styles/font.scss → template-vp-react-shadcn/src/api/.gitkeep} +0 -0
@@ -11,10 +11,6 @@ export {}
11
11
  /* prettier-ignore */
12
12
  declare module 'vue' {
13
13
  export interface GlobalComponents {
14
- ElButton: typeof import('element-plus/es')['ElButton']
15
- ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
16
- ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
17
- PlusLayout: typeof import('plus-pro-components/es')['PlusLayout']
18
14
  RouterLink: typeof import('vue-router')['RouterLink']
19
15
  RouterView: typeof import('vue-router')['RouterView']
20
16
  SvgIcon: typeof import('./../components/Icon/svg-icon.vue')['default']
@@ -1,6 +1,6 @@
1
1
  import { axiosRequestAdapter } from '@alova/adapter-axios'
2
2
  import vueHook from 'alova/vue'
3
- import { ElMessage } from 'element-plus'
3
+ import { message } from 'antdv-next'
4
4
 
5
5
  import { router } from '@/router'
6
6
 
@@ -23,14 +23,14 @@ function getBaseConfig(): Parameters<typeof createDualCallInstance>[0] {
23
23
  responseMessageKey: 'msg',
24
24
  commonHeaders: {},
25
25
  successMessageFunc: (msg: string) => {
26
- ElMessage.success(msg)
26
+ message.success(msg)
27
27
  },
28
28
  errorMessageFunc: (msg: string) => {
29
- ElMessage.error(msg)
29
+ message.error(msg)
30
30
  },
31
31
  unAuthorizedResponseFunc: () => {
32
32
  router.push('/login')
33
- ElMessage.error('登录过期或未登录')
33
+ message.error('登录过期或未登录')
34
34
  },
35
35
  statesHook: vueHook,
36
36
  requestAdapter: axiosRequestAdapter(),
@@ -1,10 +1,9 @@
1
1
  import path from 'node:path'
2
2
 
3
- import { PlusProComponentsResolver } from '@plus-pro-components/resolver'
3
+ import { AntdvNextResolver } from '@antdv-next/auto-import-resolver'
4
4
  import Vue from '@vitejs/plugin-vue'
5
5
  import UnoCSS from 'unocss/vite'
6
6
  import AutoImport from 'unplugin-auto-import/vite'
7
- import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
8
7
  import Components from 'unplugin-vue-components/vite'
9
8
  import { defineConfig, loadEnv } from 'vite'
10
9
  import Inspect from 'vite-plugin-inspect'
@@ -42,11 +41,10 @@ export default defineConfig(({ mode }) => {
42
41
  Vue(),
43
42
  AutoImport({
44
43
  imports: ['vue', 'vue-router'],
45
- resolvers: [ElementPlusResolver()],
46
44
  dts: './src/types/auto-import.d.ts',
47
45
  }),
48
46
  Components({
49
- resolvers: [ElementPlusResolver(), PlusProComponentsResolver()],
47
+ resolvers: [AntdvNextResolver()],
50
48
  dts: './src/types/components.d.ts',
51
49
  }),
52
50
  createSvgIconsPlugin({
@@ -1,5 +0,0 @@
1
- # port
2
- PUBLIC_PORT = 9945
3
- PUBLIC_PATH = '/'
4
- PUBLIC_APP_NAME = 'xxx'
5
- PUBLIC_API_AFFIX = '/api'
@@ -1 +0,0 @@
1
- PUBLIC_API_URL = 'http://localhost:8080'
@@ -1 +0,0 @@
1
- PUBLIC_API_URL = 'http://localhost:8080'
@@ -1,4 +0,0 @@
1
- # Lock files
2
- package-lock.json
3
- pnpm-lock.yaml
4
- yarn.lock
@@ -1,18 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "jsxSingleQuote": false,
4
- "trailingComma": "all",
5
- "printWidth": 100,
6
- "proseWrap": "never",
7
- "semi": false,
8
- "importOrder": ["^(vue|vue-router)$", "^([a-z]|@[a-z])", "", ".*"],
9
- "plugins": ["@ianvs/prettier-plugin-sort-imports"],
10
- "overrides": [
11
- {
12
- "files": ".prettierrc",
13
- "options": {
14
- "parser": "json"
15
- }
16
- }
17
- ]
18
- }
@@ -1,13 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "editor.defaultFormatter": "biomejs.biome",
4
- "editor.codeActionsOnSave": {
5
- "source.fixAll.biome": "explicit"
6
- },
7
- "[sass]": {
8
- "editor.defaultFormatter": "esbenp.prettier-vscode"
9
- },
10
- "[vue]": {
11
- "editor.defaultFormatter": "esbenp.prettier-vscode"
12
- }
13
- }
@@ -1,29 +0,0 @@
1
- # Rsbuild project
2
-
3
- ## Setup
4
-
5
- Install the dependencies:
6
-
7
- ```bash
8
- pnpm install
9
- ```
10
-
11
- ## Get started
12
-
13
- Start the dev server:
14
-
15
- ```bash
16
- pnpm dev
17
- ```
18
-
19
- Build the app for production:
20
-
21
- ```bash
22
- pnpm build
23
- ```
24
-
25
- Preview the production build locally:
26
-
27
- ```bash
28
- pnpm preview
29
- ```
@@ -1,109 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3
- "files": {
4
- "ignoreUnknown": true,
5
- "includes": ["**", "!public/**/*", "!node_modules/**/*", "!dist/**/*"]
6
- },
7
- "formatter": {
8
- "enabled": true,
9
- "indentStyle": "space",
10
- "lineWidth": 100,
11
- "indentWidth": 2
12
- },
13
- "linter": {
14
- "rules": {
15
- "style": {
16
- "useImportType": "off",
17
- "useNumberNamespace": "off",
18
- "useNodejsImportProtocol": "off",
19
- "noNonNullAssertion": "off",
20
- "noUnusedTemplateLiteral": "off",
21
- "useConst": {
22
- "level": "warn",
23
- "fix": "unsafe"
24
- }
25
- },
26
- "complexity": {
27
- "noUselessTypeConstraint": "off",
28
- "noForEach": "off",
29
- "useDateNow": "off"
30
- },
31
- "correctness": {
32
- "useExhaustiveDependencies": "off",
33
- "useHookAtTopLevel": "off",
34
- "noUnusedFunctionParameters": "off",
35
- "noUnusedVariables": "off",
36
- "useUniqueElementIds": "off",
37
- "useParseIntRadix": "off"
38
- },
39
- "security": {
40
- "noDangerouslySetInnerHtml": "off"
41
- },
42
- "suspicious": {
43
- "noGlobalIsNan": "off",
44
- "noGlobalIsFinite": "off",
45
- "noExplicitAny": "off",
46
- "noArrayIndexKey": "off",
47
- "noConfusingVoidType": "off",
48
- "noThenProperty": "off",
49
- "noTemplateCurlyInString": "off"
50
- },
51
- "performance": {
52
- "noDelete": "off",
53
- "noAccumulatingSpread": "off",
54
- "noDynamicNamespaceImportAccess": "off"
55
- },
56
- "a11y": {
57
- "noAriaHiddenOnFocusable": "off",
58
- "noLabelWithoutControl": "off",
59
- "useFocusableInteractive": "off",
60
- "useKeyWithClickEvents": "off",
61
- "useSemanticElements": "off",
62
- "noStaticElementInteractions": "off",
63
- "useAriaPropsSupportedByRole": "off",
64
- "useAriaPropsForRole": "off",
65
- "useValidAnchor": "off",
66
- "useMediaCaption": "off"
67
- },
68
- "nursery": {
69
- "useSortedClasses": {
70
- "level": "warn",
71
- "fix": "safe"
72
- }
73
- }
74
- }
75
- },
76
- "css": {
77
- "formatter": {
78
- "quoteStyle": "single"
79
- }
80
- },
81
- "javascript": {
82
- "jsxRuntime": "reactClassic",
83
- "formatter": {
84
- "quoteStyle": "single",
85
- "semicolons": "asNeeded"
86
- }
87
- },
88
- "assist": {
89
- "enabled": true,
90
- "actions": {
91
- "source": {
92
- "organizeImports": {
93
- "level": "on",
94
- "options": {
95
- "identifierOrder": "natural",
96
- "groups": [
97
- [":NODE:", ":BUN:"],
98
- ":BLANK_LINE:",
99
- ["react", "react-dom/**", "react-dom", "react-router", "react-router-dom"],
100
- ["vue", "vue-router"],
101
- ":BLANK_LINE:",
102
- ["@/**", "**"]
103
- ]
104
- }
105
- }
106
- }
107
- }
108
- }
109
- }
@@ -1,7 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head></head>
4
- <body>
5
- <div id="<%= mountId %>"></div>
6
- </body>
7
- </html>
@@ -1,11 +0,0 @@
1
- pre-commit:
2
- commands:
3
- check:
4
- glob: '*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc,vue}'
5
- run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files}
6
- stage_fixed: true
7
-
8
- commit-msg:
9
- commands:
10
- 'lint commit message':
11
- run: npx commitlint --edit {1}
@@ -1,36 +0,0 @@
1
- {
2
- "name": "template-project",
3
- "version": "1.0.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "build": "rsbuild build",
8
- "check": "biome check --write",
9
- "dev": "rsbuild dev --open",
10
- "format": "prettier --write .",
11
- "preview": "rsbuild preview"
12
- },
13
- "dependencies": {
14
- "@alova/adapter-axios": "^2.0.16",
15
- "alova": "^3.3.4",
16
- "axios": "^1.12.1",
17
- "element-plus": "^2.11.2",
18
- "pinia": "^3.0.3",
19
- "vue": "^3.5.21",
20
- "vue-router": "^4.5.1"
21
- },
22
- "devDependencies": {
23
- "@biomejs/biome": "^2.2.4",
24
- "@ianvs/prettier-plugin-sort-imports": "^4.7.0",
25
- "@rsbuild/core": "^1.5.6",
26
- "@rsbuild/plugin-sass": "^1.4.0",
27
- "@rsbuild/plugin-vue": "^1.1.2",
28
- "@unocss/postcss": "^66.5.1",
29
- "lefthook": "^1.13.0",
30
- "prettier": "^3.6.2",
31
- "typescript": "^5.9.2",
32
- "unocss": "^66.5.1",
33
- "unplugin-auto-import": "^20.1.0",
34
- "unplugin-vue-components": "^29.0.0"
35
- }
36
- }
@@ -1,41 +0,0 @@
1
- import { defineConfig } from '@rsbuild/core'
2
- import { pluginVue } from '@rsbuild/plugin-vue'
3
- import AutoImport from 'unplugin-auto-import/rspack'
4
- import UnoCSS from '@unocss/postcss'
5
- import { pluginSass } from '@rsbuild/plugin-sass'
6
- import Components from 'unplugin-vue-components/rspack'
7
- import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
8
-
9
- export default defineConfig({
10
- html: {
11
- template: './index.html',
12
- },
13
- resolve: {
14
- alias: {
15
- '@': './src',
16
- },
17
- },
18
- server: {
19
- port: Number(process.env.PUBLIC_PORT),
20
- },
21
- plugins: [pluginVue(), pluginSass()],
22
- tools: {
23
- rspack: {
24
- plugins: [
25
- AutoImport({
26
- imports: ['vue', 'vue-router'],
27
- dts: './src/types/auto-import.d.ts',
28
- }),
29
- Components({
30
- resolvers: [ElementPlusResolver()],
31
- dts: './src/types/components.d.ts',
32
- }),
33
- ],
34
- },
35
- postcss: {
36
- postcssOptions: {
37
- plugins: [UnoCSS()],
38
- },
39
- },
40
- },
41
- })
@@ -1,3 +0,0 @@
1
- <template>
2
- <RouterView />
3
- </template>
@@ -1,13 +0,0 @@
1
- import { createApp } from 'vue'
2
- import App from './App.vue'
3
- import '@/styles/index.css'
4
-
5
- import { setupRouter } from './router'
6
- import { setupStore } from './store'
7
-
8
- const app = createApp(App)
9
-
10
- setupRouter(app)
11
- setupStore(app)
12
-
13
- app.mount('#root')
@@ -1,6 +0,0 @@
1
- import type { Router } from 'vue-router';
2
- import { createPermissionGuard } from './permissionGuard';
3
-
4
- export const setupGuard = (router: Router) => {
5
- createPermissionGuard(router);
6
- };
@@ -1,8 +0,0 @@
1
- import type { Router } from 'vue-router';
2
-
3
- export const createPermissionGuard = (router: Router) => {
4
- router.beforeEach((to, from, next) => {
5
- next();
6
- });
7
- router.afterEach((to, from) => {});
8
- };
@@ -1,14 +0,0 @@
1
- import { createRouter, createWebHistory } from 'vue-router';
2
- import { routes } from './modules';
3
- import type { App } from 'vue';
4
-
5
- export const router = createRouter({
6
- history: createWebHistory(import.meta.env.PUBLIC_PATH),
7
- routes: routes,
8
- strict: true,
9
- scrollBehavior: () => ({ left: 0, top: 0 }),
10
- });
11
-
12
- export const setupRouter = (app: App) => {
13
- app.use(router);
14
- };
@@ -1,10 +0,0 @@
1
- import type { RouteRecordRaw } from 'vue-router'
2
-
3
- export const routes: RouteRecordRaw[] = [
4
- {
5
- path: '/',
6
- name: 'Home',
7
- meta: {},
8
- component: () => import('@/views/home/index.vue'),
9
- },
10
- ]
@@ -1,7 +0,0 @@
1
- import type { App } from "vue"
2
- import { createPinia } from "pinia"
3
-
4
- export const store = createPinia()
5
- export const setupStore = (app: App) => {
6
- app.use(store)
7
- }
@@ -1,17 +0,0 @@
1
- import { defineStore } from "pinia";
2
- import { store } from "..";
3
-
4
- export const useUserStore = defineStore(
5
- 'user',{
6
- state: () => {
7
- return {
8
- name: 'admin',
9
- token: 'admin',
10
- avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif'
11
- }
12
- },
13
- })
14
-
15
- export function useUserStoreWithOut() {
16
- return useUserStore(store);
17
- }
@@ -1,16 +0,0 @@
1
- @unocss;
2
-
3
- html,
4
- body,
5
- #root {
6
- width: 100%;
7
- height: 100%;
8
- }
9
-
10
- *,
11
- *::before,
12
- *::after {
13
- margin: 0;
14
- padding: 0;
15
- box-sizing: border-box;
16
- }
@@ -1,78 +0,0 @@
1
- /* eslint-disable */
2
- /* prettier-ignore */
3
- // @ts-nocheck
4
- // noinspection JSUnusedGlobalSymbols
5
- // Generated by unplugin-auto-import
6
- // biome-ignore lint: disable
7
- export {}
8
- declare global {
9
- const EffectScope: typeof import('vue')['EffectScope']
10
- const computed: typeof import('vue')['computed']
11
- const createApp: typeof import('vue')['createApp']
12
- const customRef: typeof import('vue')['customRef']
13
- const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
14
- const defineComponent: typeof import('vue')['defineComponent']
15
- const effectScope: typeof import('vue')['effectScope']
16
- const getCurrentInstance: typeof import('vue')['getCurrentInstance']
17
- const getCurrentScope: typeof import('vue')['getCurrentScope']
18
- const getCurrentWatcher: typeof import('vue')['getCurrentWatcher']
19
- const h: typeof import('vue')['h']
20
- const inject: typeof import('vue')['inject']
21
- const isProxy: typeof import('vue')['isProxy']
22
- const isReactive: typeof import('vue')['isReactive']
23
- const isReadonly: typeof import('vue')['isReadonly']
24
- const isRef: typeof import('vue')['isRef']
25
- const isShallow: typeof import('vue')['isShallow']
26
- const markRaw: typeof import('vue')['markRaw']
27
- const nextTick: typeof import('vue')['nextTick']
28
- const onActivated: typeof import('vue')['onActivated']
29
- const onBeforeMount: typeof import('vue')['onBeforeMount']
30
- const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
31
- const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
32
- const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
33
- const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
34
- const onDeactivated: typeof import('vue')['onDeactivated']
35
- const onErrorCaptured: typeof import('vue')['onErrorCaptured']
36
- const onMounted: typeof import('vue')['onMounted']
37
- const onRenderTracked: typeof import('vue')['onRenderTracked']
38
- const onRenderTriggered: typeof import('vue')['onRenderTriggered']
39
- const onScopeDispose: typeof import('vue')['onScopeDispose']
40
- const onServerPrefetch: typeof import('vue')['onServerPrefetch']
41
- const onUnmounted: typeof import('vue')['onUnmounted']
42
- const onUpdated: typeof import('vue')['onUpdated']
43
- const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
44
- const provide: typeof import('vue')['provide']
45
- const reactive: typeof import('vue')['reactive']
46
- const readonly: typeof import('vue')['readonly']
47
- const ref: typeof import('vue')['ref']
48
- const resolveComponent: typeof import('vue')['resolveComponent']
49
- const shallowReactive: typeof import('vue')['shallowReactive']
50
- const shallowReadonly: typeof import('vue')['shallowReadonly']
51
- const shallowRef: typeof import('vue')['shallowRef']
52
- const toRaw: typeof import('vue')['toRaw']
53
- const toRef: typeof import('vue')['toRef']
54
- const toRefs: typeof import('vue')['toRefs']
55
- const toValue: typeof import('vue')['toValue']
56
- const triggerRef: typeof import('vue')['triggerRef']
57
- const unref: typeof import('vue')['unref']
58
- const useAttrs: typeof import('vue')['useAttrs']
59
- const useCssModule: typeof import('vue')['useCssModule']
60
- const useCssVars: typeof import('vue')['useCssVars']
61
- const useId: typeof import('vue')['useId']
62
- const useLink: typeof import('vue-router')['useLink']
63
- const useModel: typeof import('vue')['useModel']
64
- const useRoute: typeof import('vue-router')['useRoute']
65
- const useRouter: typeof import('vue-router')['useRouter']
66
- const useSlots: typeof import('vue')['useSlots']
67
- const useTemplateRef: typeof import('vue')['useTemplateRef']
68
- const watch: typeof import('vue')['watch']
69
- const watchEffect: typeof import('vue')['watchEffect']
70
- const watchPostEffect: typeof import('vue')['watchPostEffect']
71
- const watchSyncEffect: typeof import('vue')['watchSyncEffect']
72
- }
73
- // for type re-export
74
- declare global {
75
- // @ts-ignore
76
- export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, ShallowRef, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
77
- import('vue')
78
- }
@@ -1,15 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- // Generated by unplugin-vue-components
4
- // Read more: https://github.com/vuejs/core/pull/3399
5
- // biome-ignore lint: disable
6
- export {}
7
-
8
- /* prettier-ignore */
9
- declare module 'vue' {
10
- export interface GlobalComponents {
11
- ElButton: typeof import('element-plus/es')['ElButton']
12
- RouterLink: typeof import('vue-router')['RouterLink']
13
- RouterView: typeof import('vue-router')['RouterView']
14
- }
15
- }
@@ -1,17 +0,0 @@
1
- /// <reference types="@rsbuild/core/types" />
2
-
3
- declare module '*.vue' {
4
- import type { DefineComponent } from 'vue'
5
-
6
- // biome-ignore lint/complexity/noBannedTypes: reason
7
- const component: DefineComponent<{}, {}, any>
8
- export default component
9
- }
10
-
11
- interface ImportMetaEnv {
12
- readonly PUBLIC_PATH: string
13
- }
14
-
15
- interface ImportMeta {
16
- readonly env: ImportMetaEnv
17
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * 通过一个文件导出所有的环境变量这样方便统一修改
3
- * @returns
4
- */
5
- export const envVariables = {
6
- PUBLIC_PORT: import.meta.env.PUBLIC_PORT,
7
- PUBLIC_PATH: import.meta.env.PUBLIC_PATH,
8
- PUBLIC_APP_NAME: import.meta.env.PUBLIC_APP_NAME,
9
- PUBLIC_API_AFFIX: import.meta.env.PUBLIC_API_AFFIX,
10
- }