@citruslime/create-boilerplate 1.4.1-beta.0 → 1.4.2-beta.0
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/main.mjs +3 -3
- package/package.json +1 -1
- package/template/env.d.ts +0 -1
- package/template/src/pages/dasboard/index.vue +2 -2
- package/template/src/router/index.ts +9 -12
- package/template/{tailwind.config.cjs → tailwind.config.ts} +4 -3
- package/template/tsconfig.app.json +1 -0
- package/template/vite.config.ts +9 -7
package/main.mjs
CHANGED
|
@@ -116,15 +116,15 @@ const dependenciesToInstall = [
|
|
|
116
116
|
dev: true
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
name: '
|
|
119
|
+
name: 'unplugin-vue-router',
|
|
120
120
|
dev: true
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
|
-
name: 'vite
|
|
123
|
+
name: 'vite',
|
|
124
124
|
dev: true
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
name: 'vite-plugin-
|
|
127
|
+
name: 'vite-plugin-mkcert',
|
|
128
128
|
dev: true
|
|
129
129
|
},
|
|
130
130
|
{
|
package/package.json
CHANGED
package/template/env.d.ts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import generatedRoutes from 'virtual:generated-pages';
|
|
2
|
-
|
|
3
|
-
export const routes: RouteRecordRaw[] = [
|
|
4
|
-
...generatedRoutes,
|
|
5
|
-
{
|
|
6
|
-
name: 'not-found',
|
|
7
|
-
path: '/:pathMatch(.*)*',
|
|
8
|
-
redirect: '/'
|
|
9
|
-
}
|
|
10
|
-
];
|
|
11
|
-
|
|
12
1
|
const router = createRouter({
|
|
13
2
|
history: createWebHashHistory(),
|
|
14
|
-
routes
|
|
3
|
+
extendRoutes (routes) {
|
|
4
|
+
routes.push({
|
|
5
|
+
name: 'not-found',
|
|
6
|
+
path: '/:pathMatch(.*)*',
|
|
7
|
+
redirect: '/'
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
return routes;
|
|
11
|
+
}
|
|
15
12
|
});
|
|
16
13
|
|
|
17
14
|
export default router;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { Config } from 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
3
4
|
presets: [require('@citruslime/theme')],
|
|
4
5
|
content: [
|
|
5
6
|
'./index.html',
|
|
6
7
|
'./src/**/*.{vue,js,cjs,mjs,ts}'
|
|
7
8
|
]
|
|
8
|
-
};
|
|
9
|
+
} satisfies Config;
|
package/template/vite.config.ts
CHANGED
|
@@ -5,9 +5,10 @@ import vue from '@vitejs/plugin-vue';
|
|
|
5
5
|
import autoImport from 'unplugin-auto-import/vite';
|
|
6
6
|
import { VueUseComponentsResolver } from 'unplugin-vue-components/resolvers';
|
|
7
7
|
import components from 'unplugin-vue-components/vite';
|
|
8
|
+
import { VueRouterAutoImports, getPascalCaseRouteName } from 'unplugin-vue-router';
|
|
9
|
+
import router from 'unplugin-vue-router/vite';
|
|
8
10
|
import { defineConfig } from 'vite';
|
|
9
11
|
import mkcert from 'vite-plugin-mkcert';
|
|
10
|
-
import pages from 'vite-plugin-pages';
|
|
11
12
|
|
|
12
13
|
export default defineConfig({
|
|
13
14
|
plugins: [
|
|
@@ -22,16 +23,16 @@ export default defineConfig({
|
|
|
22
23
|
'pinia',
|
|
23
24
|
'vue',
|
|
24
25
|
'vue-i18n',
|
|
25
|
-
|
|
26
|
+
VueRouterAutoImports,
|
|
26
27
|
{
|
|
27
|
-
from: 'vue-router',
|
|
28
|
+
from: 'vue-router/auto',
|
|
28
29
|
imports: [
|
|
29
30
|
'createRouter',
|
|
30
31
|
'createWebHashHistory'
|
|
31
32
|
]
|
|
32
33
|
},
|
|
33
34
|
{
|
|
34
|
-
from: 'vue-router',
|
|
35
|
+
from: 'vue-router/auto',
|
|
35
36
|
imports: ['RouteRecordRaw'],
|
|
36
37
|
type: true
|
|
37
38
|
},
|
|
@@ -55,9 +56,10 @@ export default defineConfig({
|
|
|
55
56
|
CitrusLimeUI()
|
|
56
57
|
]
|
|
57
58
|
}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
extensions: ['vue']
|
|
59
|
+
router({
|
|
60
|
+
routesFolder: 'src/pages',
|
|
61
|
+
extensions: ['.vue'],
|
|
62
|
+
getRouteName: getPascalCaseRouteName
|
|
61
63
|
}),
|
|
62
64
|
vue(),
|
|
63
65
|
mkcert()
|