@sidekick-coder/zenith-kit 0.3.8 → 0.3.10
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/dist/client/index.es.js +7782 -9218
- package/dist/components/index.es.js +39309 -16469
- package/dist/server/index.d.mts +1 -1
- package/package.json +2 -2
- package/src/client/components/ui/form/injectionKeys.ts +1 -2
- package/vite/createViteConfig.js +7 -9
- package/vite.client.config.ts +33 -17
- package/vite.common.config.ts +49 -0
- package/vite.components.config.ts +102 -0
- package/dist/client/index-DRqJOqUR.mjs +0 -3484
- package/dist/components/index-DRqJOqUR.mjs +0 -3484
- package/vite.config.ts +0 -86
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sidekick-coder/zenith-kit",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Package to use with zenith framework",
|
|
6
6
|
"author": "Henrique Oliveira <henriqueoliwork@gmail.com>",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build:server": "tsdown",
|
|
72
72
|
"build:client": "vite build --config vite.client.config.ts",
|
|
73
|
-
"build:components": "vite build",
|
|
73
|
+
"build:components": "vite build --config vite.components.config.ts",
|
|
74
74
|
"build": "npm-run-all -p build:*",
|
|
75
75
|
"test:unit": "vitest --project unit",
|
|
76
76
|
"test:int": "vitest -p integration",
|
package/vite/createViteConfig.js
CHANGED
|
@@ -35,13 +35,13 @@ export default function(options) {
|
|
|
35
35
|
}
|
|
36
36
|
}),
|
|
37
37
|
tailwindcss(),
|
|
38
|
-
zenith({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
})
|
|
38
|
+
// zenith({
|
|
39
|
+
// imports: [
|
|
40
|
+
// 'vue',
|
|
41
|
+
// 'vue-router',
|
|
42
|
+
// 'vee-validate'
|
|
43
|
+
// ],
|
|
44
|
+
// })
|
|
45
45
|
],
|
|
46
46
|
build: {
|
|
47
47
|
outDir: options.outDir,
|
|
@@ -52,8 +52,6 @@ export default function(options) {
|
|
|
52
52
|
rollupOptions: {
|
|
53
53
|
external: [
|
|
54
54
|
'vue',
|
|
55
|
-
'vue-router',
|
|
56
|
-
'vee-validate'
|
|
57
55
|
],
|
|
58
56
|
},
|
|
59
57
|
lib: {
|
package/vite.client.config.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { createLogger, defineConfig, UserConfig } from 'vite'
|
|
1
|
+
import { createLogger, defineConfig, mergeConfig, UserConfig } from 'vite'
|
|
2
2
|
import vue from '@vitejs/plugin-vue'
|
|
3
3
|
import tailwindcss from '@tailwindcss/vite'
|
|
4
4
|
import dts from 'vite-plugin-dts'
|
|
5
5
|
import { generateIndexFile } from '#server/utils/generateIndexFile.ts'
|
|
6
6
|
import zenith from './vite/plugins/zenith'
|
|
7
|
+
import viteCommonConfig from './vite.common.config'
|
|
7
8
|
|
|
8
9
|
const logger = createLogger()
|
|
9
10
|
|
|
@@ -56,30 +57,45 @@ const plugins: UserConfig['plugins'] = [
|
|
|
56
57
|
}),
|
|
57
58
|
]
|
|
58
59
|
|
|
59
|
-
plugins.push(dts({
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}))
|
|
60
|
+
// plugins.push(dts({
|
|
61
|
+
// // entryRoot: 'src/client/index.ts',
|
|
62
|
+
// tsconfigPath: './tsconfig.client.json',
|
|
63
|
+
// staticImport: true,
|
|
64
|
+
// }))
|
|
65
|
+
//
|
|
66
|
+
// plugins.push(tailwindcss(), prebuild())
|
|
64
67
|
|
|
65
|
-
plugins.push(
|
|
66
|
-
|
|
67
|
-
}))
|
|
68
|
+
// plugins.push(zenith({
|
|
69
|
+
// imports: externals
|
|
70
|
+
// }))
|
|
68
71
|
|
|
69
|
-
export default defineConfig({
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
// export default defineConfig({
|
|
73
|
+
// customLogger: logger,
|
|
74
|
+
// plugins: plugins,
|
|
75
|
+
// build: {
|
|
76
|
+
// outDir: 'dist/client',
|
|
77
|
+
// rollupOptions: {
|
|
78
|
+
// external: externals,
|
|
79
|
+
// },
|
|
80
|
+
// lib: {
|
|
81
|
+
// name: 'Client',
|
|
82
|
+
// entry: 'src/client/index.ts',
|
|
83
|
+
// formats: ['es'],
|
|
84
|
+
// fileName: (format) => `index.${format}.js`,
|
|
85
|
+
// cssFileName: 'styles',
|
|
86
|
+
// },
|
|
87
|
+
// },
|
|
88
|
+
// })
|
|
89
|
+
export default mergeConfig(viteCommonConfig, defineConfig({
|
|
90
|
+
plugins: [prebuild()],
|
|
72
91
|
build: {
|
|
73
92
|
outDir: 'dist/client',
|
|
74
|
-
rollupOptions: {
|
|
75
|
-
external: externals,
|
|
76
|
-
},
|
|
77
93
|
lib: {
|
|
78
|
-
name: '
|
|
94
|
+
name: 'Components',
|
|
79
95
|
entry: 'src/client/index.ts',
|
|
80
96
|
formats: ['es'],
|
|
81
97
|
fileName: (format) => `index.${format}.js`,
|
|
82
98
|
cssFileName: 'styles',
|
|
83
99
|
},
|
|
84
100
|
},
|
|
85
|
-
})
|
|
101
|
+
}))
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createLogger, defineConfig, UserConfig } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
+
import dts from 'vite-plugin-dts'
|
|
5
|
+
|
|
6
|
+
export const logger = createLogger()
|
|
7
|
+
|
|
8
|
+
const externals = [
|
|
9
|
+
'vue',
|
|
10
|
+
// 'vue-router',
|
|
11
|
+
// '@vueuse/core',
|
|
12
|
+
// '@vueuse/router',
|
|
13
|
+
'vee-validate',
|
|
14
|
+
'@vee-validate/valibot',
|
|
15
|
+
// "@unhead/vue",
|
|
16
|
+
// "vue-router",
|
|
17
|
+
// "vue-sonner",
|
|
18
|
+
// "vee-validate",
|
|
19
|
+
// "reka-ui",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
const plugins: UserConfig['plugins'] = [
|
|
23
|
+
vue({
|
|
24
|
+
template: {
|
|
25
|
+
compilerOptions: {
|
|
26
|
+
isCustomElement: (tag) => {
|
|
27
|
+
return ['iconify-icon'].includes(tag)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
plugins.push(dts({
|
|
35
|
+
tsconfigPath: './tsconfig.client.json',
|
|
36
|
+
staticImport: true,
|
|
37
|
+
}))
|
|
38
|
+
|
|
39
|
+
plugins.push(tailwindcss())
|
|
40
|
+
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
customLogger: logger,
|
|
43
|
+
plugins: plugins,
|
|
44
|
+
build: {
|
|
45
|
+
rollupOptions: {
|
|
46
|
+
external: externals,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
})
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { createLogger, defineConfig, mergeConfig, UserConfig } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
4
|
+
import dts from 'vite-plugin-dts'
|
|
5
|
+
import { generateIndexFile } from '#server/utils/generateIndexFile.ts'
|
|
6
|
+
import zenith from './vite/plugins/zenith'
|
|
7
|
+
import viteCommonConfig, { logger } from './vite.common.config'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const prebuild = () => ({
|
|
11
|
+
name: 'prebuild',
|
|
12
|
+
buildStart() {
|
|
13
|
+
generateIndexFile({
|
|
14
|
+
filename: 'src/client/components.ts',
|
|
15
|
+
patterns: [
|
|
16
|
+
'src/client/composables/*.ts',
|
|
17
|
+
'src/client/components/ui/**/index.ts',
|
|
18
|
+
'src/client/components/*.vue',
|
|
19
|
+
'src/client/layouts/*.vue',
|
|
20
|
+
'src/client/css/*.css',
|
|
21
|
+
]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
logger.info('Generated components.ts for components')
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const externals = [
|
|
29
|
+
'vue',
|
|
30
|
+
// 'vue-router',
|
|
31
|
+
// "vue-sonner",
|
|
32
|
+
//
|
|
33
|
+
// '@vueuse/core',
|
|
34
|
+
// '@vueuse/router',
|
|
35
|
+
//
|
|
36
|
+
// 'vee-validate',
|
|
37
|
+
// '@vee-validate/valibot',
|
|
38
|
+
// //
|
|
39
|
+
// "@unhead/vue",
|
|
40
|
+
// "@unhead/vue/components",
|
|
41
|
+
|
|
42
|
+
// "reka-ui",
|
|
43
|
+
// "vaul-vue",
|
|
44
|
+
// "lucide-vue-next",
|
|
45
|
+
// "embla-carousel-vue"
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
// const plugins: UserConfig['plugins'] = [
|
|
49
|
+
// vue({
|
|
50
|
+
// template: {
|
|
51
|
+
// compilerOptions: {
|
|
52
|
+
// isCustomElement: (tag) => {
|
|
53
|
+
// return ['iconify-icon'].includes(tag)
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
// }
|
|
57
|
+
// }),
|
|
58
|
+
// ]
|
|
59
|
+
//
|
|
60
|
+
// plugins.push(dts({
|
|
61
|
+
// // entryRoot: 'src/client/components.ts',
|
|
62
|
+
// tsconfigPath: './tsconfig.client.json',
|
|
63
|
+
// staticImport: true
|
|
64
|
+
// }))
|
|
65
|
+
|
|
66
|
+
// plugins.push(tailwindcss(), prebuild())
|
|
67
|
+
|
|
68
|
+
// plugins.push(zenith({
|
|
69
|
+
// imports: externals
|
|
70
|
+
// }))
|
|
71
|
+
|
|
72
|
+
export default mergeConfig(viteCommonConfig, defineConfig({
|
|
73
|
+
plugins: [prebuild()],
|
|
74
|
+
build: {
|
|
75
|
+
outDir: 'dist/components',
|
|
76
|
+
lib: {
|
|
77
|
+
name: 'Components',
|
|
78
|
+
entry: 'src/client/components.ts',
|
|
79
|
+
formats: ['es'],
|
|
80
|
+
fileName: (format) => `index.${format}.js`,
|
|
81
|
+
cssFileName: 'styles',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
}))
|
|
85
|
+
|
|
86
|
+
// export default defineConfig({
|
|
87
|
+
// customLogger: logger,
|
|
88
|
+
// plugins: plugins,
|
|
89
|
+
// build: {
|
|
90
|
+
// outDir: 'dist/components',
|
|
91
|
+
// rollupOptions: {
|
|
92
|
+
// external: externals,
|
|
93
|
+
// },
|
|
94
|
+
// lib: {
|
|
95
|
+
// name: 'Client',
|
|
96
|
+
// entry: 'src/client/components.ts',
|
|
97
|
+
// formats: ['es'],
|
|
98
|
+
// fileName: (format) => `index.${format}.js`,
|
|
99
|
+
// cssFileName: 'styles',
|
|
100
|
+
// },
|
|
101
|
+
// },
|
|
102
|
+
// })
|