@kevairy/template 0.1.0 → 0.1.1
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.
- package/package.json +10 -8
- package/template/.env +0 -0
- package/template/.env.development +0 -0
- package/template/.env.production +0 -3
- package/template/LICENSE +0 -0
- package/template/_gitignore +0 -0
- package/template/index.html +0 -0
- package/template/package.json +1 -7
- package/template/public/favicon.ico +0 -0
- package/template/src/App.vue +0 -0
- package/template/src/assets/styles/core/app.scss +0 -0
- package/template/src/assets/styles/core/dark.scss +0 -0
- package/template/src/assets/styles/core/mixin.scss +0 -0
- package/template/src/assets/styles/core/reset.scss +0 -0
- package/template/src/assets/styles/core/tailwind.css +2 -1
- package/template/src/assets/styles/core/theme-change.scss +0 -0
- package/template/src/components/core/layouts/art-breadcrumb/index.vue +0 -0
- package/template/src/components/core/layouts/art-header-bar/index.vue +0 -0
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue +0 -0
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/style.scss +0 -0
- package/template/src/components/core/layouts/art-menus/art-sidebar-menu/widget/SidebarSubmenu.vue +0 -0
- package/template/src/components/core/layouts/art-notification/index.vue +0 -0
- package/template/src/components/core/layouts/art-settings-panel/index.vue +0 -0
- package/template/src/components/core/layouts/art-settings-panel/style.scss +0 -0
- package/template/src/components/core/layouts/art-work-tab/index.vue +0 -0
- package/template/src/directives/core/auth.ts +0 -0
- package/template/src/directives/core/highlight.ts +1 -0
- package/template/src/directives/index.ts +0 -0
- package/template/src/enums/appEnum.ts +0 -0
- package/template/src/env.d.ts +0 -0
- package/template/src/main.ts +0 -6
- package/template/src/router/index.ts +0 -0
- package/template/src/store/index.ts +0 -0
- package/template/src/store/modules/menu.ts +0 -0
- package/template/src/store/modules/setting.ts +0 -0
- package/template/src/store/modules/user.ts +0 -0
- package/template/src/store/modules/worktab.ts +0 -0
- package/template/src/utils/http/status.ts +0 -0
- package/template/src/utils/ui/colors.ts +0 -0
- package/template/src/views/exception/403/index.vue +0 -0
- package/template/src/views/exception/404/index.vue +0 -0
- package/template/src/views/exception/500/index.vue +0 -0
- package/template/src/views/index/index.vue +0 -0
- package/template/src/views/result/fail/index.vue +0 -0
- package/template/src/views/result/success/index.vue +0 -0
- package/template/tsconfig.json +0 -0
- package/template/vite.config.ts +21 -46
- package/template/src/assets/images/login/kylin-hero-source.png +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevairy/template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Project template consumed by @kevairy/cli",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
"README.md",
|
|
17
17
|
"LICENSE"
|
|
18
18
|
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"sync:template": "node scripts/sync-template.js",
|
|
21
|
+
"check:template": "node scripts/check-template-sync.js",
|
|
22
|
+
"prepack": "pnpm check:template",
|
|
23
|
+
"prepublishOnly": "pnpm test",
|
|
24
|
+
"test": "vitest run tests/sync-template.spec.js",
|
|
25
|
+
"typecheck": "tsc --noEmit --allowJs --checkJs --module NodeNext --moduleResolution NodeNext --target ES2022 scripts/*.js"
|
|
26
|
+
},
|
|
19
27
|
"engines": {
|
|
20
28
|
"node": ">=20.19.0"
|
|
21
29
|
},
|
|
@@ -27,11 +35,5 @@
|
|
|
27
35
|
"@types/node": "^24.13.3",
|
|
28
36
|
"typescript": "~5.6.3",
|
|
29
37
|
"vitest": "^4.1.10"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"sync:template": "node scripts/sync-template.js",
|
|
33
|
-
"check:template": "node scripts/check-template-sync.js",
|
|
34
|
-
"test": "vitest run tests/sync-template.spec.js",
|
|
35
|
-
"typecheck": "tsc --noEmit --allowJs --checkJs --module NodeNext --moduleResolution NodeNext --target ES2022 scripts/*.js"
|
|
36
38
|
}
|
|
37
|
-
}
|
|
39
|
+
}
|
package/template/.env
CHANGED
|
File without changes
|
|
File without changes
|
package/template/.env.production
CHANGED
package/template/LICENSE
CHANGED
|
File without changes
|
package/template/_gitignore
CHANGED
|
File without changes
|
package/template/index.html
CHANGED
|
File without changes
|
package/template/package.json
CHANGED
|
@@ -12,9 +12,8 @@
|
|
|
12
12
|
"@e965/xlsx": "0.20.3",
|
|
13
13
|
"@element-plus/icons-vue": "2.3.2",
|
|
14
14
|
"@iconify/vue": "5.0.1",
|
|
15
|
-
"@kevairy/components": "0.
|
|
15
|
+
"@kevairy/components": "0.2.0",
|
|
16
16
|
"@tailwindcss/vite": "4.3.3",
|
|
17
|
-
"@vue/reactivity": "3.5.41",
|
|
18
17
|
"@vueuse/core": "13.9.0",
|
|
19
18
|
"@wangeditor/editor": "5.1.23",
|
|
20
19
|
"@wangeditor/editor-for-vue": "5.1.12",
|
|
@@ -25,13 +24,11 @@
|
|
|
25
24
|
"highlight.js": "11.12.0",
|
|
26
25
|
"mitt": "3.0.1",
|
|
27
26
|
"nprogress": "0.2.0",
|
|
28
|
-
"ohash": "2.0.12",
|
|
29
27
|
"pinia": "3.0.4",
|
|
30
28
|
"pinia-plugin-persistedstate": "4.7.1",
|
|
31
29
|
"qrcode.vue": "3.10.0",
|
|
32
30
|
"tailwindcss": "4.3.3",
|
|
33
31
|
"vue": "3.5.41",
|
|
34
|
-
"vue-draggable-plus": "0.6.1",
|
|
35
32
|
"vue-i18n": "11.4.8",
|
|
36
33
|
"vue-router": "4.6.4",
|
|
37
34
|
"xgplayer": "3.0.26"
|
|
@@ -63,14 +60,11 @@
|
|
|
63
60
|
"happy-dom": "20.11.2",
|
|
64
61
|
"rollup-plugin-visualizer": "5.14.0",
|
|
65
62
|
"sass": "1.102.0",
|
|
66
|
-
"terser": "5.50.0",
|
|
67
63
|
"typescript": "5.6.3",
|
|
68
64
|
"unplugin-auto-import": "20.3.0",
|
|
69
65
|
"unplugin-element-plus": "0.10.0",
|
|
70
66
|
"unplugin-vue-components": "29.2.0",
|
|
71
67
|
"vite": "7.3.6",
|
|
72
|
-
"vite-plugin-compression": "0.5.1",
|
|
73
|
-
"vite-plugin-vue-devtools": "8.2.1",
|
|
74
68
|
"vitest": "4.1.10",
|
|
75
69
|
"vue-demi": "0.14.10",
|
|
76
70
|
"vue-img-cutter": "3.1.1",
|
|
File without changes
|
package/template/src/App.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/template/src/components/core/layouts/art-menus/art-sidebar-menu/widget/SidebarSubmenu.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/template/src/env.d.ts
CHANGED
|
File without changes
|
package/template/src/main.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/template/tsconfig.json
CHANGED
|
File without changes
|
package/template/vite.config.ts
CHANGED
|
@@ -2,8 +2,6 @@ import { defineConfig, loadEnv } from 'vite'
|
|
|
2
2
|
import vue from '@vitejs/plugin-vue'
|
|
3
3
|
import path from 'path'
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
|
-
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
6
|
-
import viteCompression from 'vite-plugin-compression'
|
|
7
5
|
import Components from 'unplugin-vue-components/vite'
|
|
8
6
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
9
7
|
import ElementPlus from 'unplugin-element-plus/vite'
|
|
@@ -54,16 +52,8 @@ export default ({ mode }: { mode: string }) => {
|
|
|
54
52
|
build: {
|
|
55
53
|
target: 'es2015',
|
|
56
54
|
outDir: 'dist',
|
|
57
|
-
chunkSizeWarningLimit:
|
|
58
|
-
minify: '
|
|
59
|
-
terserOptions: {
|
|
60
|
-
compress: {
|
|
61
|
-
// 生产环境去除 console
|
|
62
|
-
drop_console: true,
|
|
63
|
-
// 生产环境去除 debugger
|
|
64
|
-
drop_debugger: true
|
|
65
|
-
}
|
|
66
|
-
},
|
|
55
|
+
chunkSizeWarningLimit: 700,
|
|
56
|
+
minify: 'esbuild',
|
|
67
57
|
rollupOptions: {
|
|
68
58
|
output: {
|
|
69
59
|
manualChunks: splitVendorChunk
|
|
@@ -82,7 +72,7 @@ export default ({ mode }: { mode: string }) => {
|
|
|
82
72
|
AutoImport({
|
|
83
73
|
imports: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
|
|
84
74
|
dts: 'src/types/import/auto-imports.d.ts',
|
|
85
|
-
resolvers: [ElementPlusResolver()],
|
|
75
|
+
resolvers: [ElementPlusResolver({ importStyle: 'css' })],
|
|
86
76
|
eslintrc: {
|
|
87
77
|
enabled: true,
|
|
88
78
|
filepath: './eslint-auto-import.json',
|
|
@@ -92,22 +82,12 @@ export default ({ mode }: { mode: string }) => {
|
|
|
92
82
|
// 自动按需导入组件
|
|
93
83
|
Components({
|
|
94
84
|
dts: 'src/types/import/components.d.ts',
|
|
95
|
-
resolvers: [ElementPlusResolver()]
|
|
85
|
+
resolvers: [ElementPlusResolver({ importStyle: 'css' })]
|
|
96
86
|
}),
|
|
97
87
|
// 按需定制主题配置
|
|
98
88
|
ElementPlus({
|
|
99
|
-
useSource:
|
|
100
|
-
})
|
|
101
|
-
// 压缩
|
|
102
|
-
viteCompression({
|
|
103
|
-
verbose: false, // 是否在控制台输出压缩结果
|
|
104
|
-
disable: false, // 是否禁用
|
|
105
|
-
algorithm: 'gzip', // 压缩算法
|
|
106
|
-
ext: '.gz', // 压缩后的文件名后缀
|
|
107
|
-
threshold: 10240, // 只有大小大于该值的资源会被处理 10240B = 10KB
|
|
108
|
-
deleteOriginFile: false // 压缩后是否删除原文件
|
|
109
|
-
}),
|
|
110
|
-
vueDevTools()
|
|
89
|
+
useSource: false
|
|
90
|
+
})
|
|
111
91
|
// 打包分析
|
|
112
92
|
// visualizer({
|
|
113
93
|
// open: true,
|
|
@@ -116,32 +96,27 @@ export default ({ mode }: { mode: string }) => {
|
|
|
116
96
|
// filename: 'dist/stats.html' // 分析图生成的文件名及路径
|
|
117
97
|
// }),
|
|
118
98
|
],
|
|
119
|
-
//
|
|
99
|
+
// 只预构建首屏稳定依赖,重型功能在实际访问时再按需处理。
|
|
120
100
|
optimizeDeps: {
|
|
121
101
|
include: [
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'
|
|
126
|
-
'
|
|
127
|
-
'xgplayer',
|
|
128
|
-
'file-saver',
|
|
129
|
-
'vue-img-cutter',
|
|
102
|
+
'vue',
|
|
103
|
+
'vue-router',
|
|
104
|
+
'pinia',
|
|
105
|
+
'vue-i18n',
|
|
106
|
+
'axios',
|
|
130
107
|
'element-plus/es',
|
|
131
|
-
'element-plus/es/components
|
|
132
|
-
'element-plus/es/components
|
|
108
|
+
'element-plus/es/components/base/style/css',
|
|
109
|
+
'element-plus/es/components/config-provider/style/css',
|
|
110
|
+
'element-plus/es/components/message/style/css'
|
|
133
111
|
]
|
|
134
112
|
},
|
|
113
|
+
esbuild:
|
|
114
|
+
mode === 'production'
|
|
115
|
+
? {
|
|
116
|
+
drop: ['console', 'debugger']
|
|
117
|
+
}
|
|
118
|
+
: undefined,
|
|
135
119
|
css: {
|
|
136
|
-
preprocessorOptions: {
|
|
137
|
-
// sass variable and mixin
|
|
138
|
-
scss: {
|
|
139
|
-
additionalData: `
|
|
140
|
-
@use "@styles/core/el-light.scss" as *;
|
|
141
|
-
@use "@styles/core/mixin.scss" as *;
|
|
142
|
-
`
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
120
|
postcss: {
|
|
146
121
|
plugins: [
|
|
147
122
|
{
|
|
Binary file
|