@gx-design-vue/create-gx-cli 0.1.22 → 0.1.24
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 +1 -1
- package/template-vite-project/.env +3 -0
- package/template-vite-project/eslint.config.js +58 -0
- package/template-vite-project/internal/vite/vite/plugin/index.ts +1 -26
- package/template-vite-project/internal/vite/vite/plugin/viteNotice.ts +1 -4
- package/template-vite-project/node_modules/.bin/eslint +21 -0
- package/template-vite-project/node_modules/.bin/eslint-config +21 -0
- package/template-vite-project/node_modules/.bin/vite +2 -2
- package/template-vite-project/node_modules/.vite/deps/@vueuse_core.js +8256 -0
- package/template-vite-project/node_modules/.vite/deps/@vueuse_core.js.map +1 -0
- package/template-vite-project/node_modules/.vite/deps/_metadata.json +38 -0
- package/template-vite-project/node_modules/.vite/deps/dayjs.js +308 -0
- package/template-vite-project/node_modules/.vite/deps/dayjs.js.map +1 -0
- package/template-vite-project/node_modules/.vite/deps/package.json +3 -0
- package/template-vite-project/node_modules/.vite/deps/vue-router.js +2755 -0
- package/template-vite-project/node_modules/.vite/deps/vue-router.js.map +1 -0
- package/template-vite-project/node_modules/.vite/deps/vue.js +3 -0
- package/template-vite-project/node_modules/.vite/deps/vue.runtime.esm-bundler-Czi1PEVY.js +8318 -0
- package/template-vite-project/node_modules/.vite/deps/vue.runtime.esm-bundler-Czi1PEVY.js.map +1 -0
- package/template-vite-project/package.json +9 -2
- package/template-vite-project/src/App.vue +3 -3
- package/template-vite-project/src/components/HelloWorld.vue +8 -7
- package/template-vite-project/src/design/index.less +79 -0
- package/template-vite-project/types/ant-design-import.d.ts +15 -0
- package/template-vite-project/types/auto-imports.d.ts +78 -0
- package/template-vite-project/types/global.d.ts +3 -0
- package/template-vite-project/internal/vite/vite/plugin/compress.ts +0 -31
- package/template-vite-project/internal/vite/vite/plugin/html.ts +0 -24
@@ -17,21 +17,28 @@
|
|
17
17
|
"ant-design-vue": "latest",
|
18
18
|
"dayjs": "^1.11.13",
|
19
19
|
"lodash-es": "^4.17.21",
|
20
|
-
"unocss": "^66.4.2",
|
21
20
|
"vue": "^3.5.18"
|
22
21
|
},
|
23
22
|
"devDependencies": {
|
23
|
+
"@antfu/eslint-config": "^5.2.1",
|
24
24
|
"@types/lodash-es": "^4.17.10",
|
25
25
|
"@types/node": "^24.0.0",
|
26
|
+
"@vitejs/plugin-legacy": "^7.2.1",
|
26
27
|
"@vitejs/plugin-vue": "^6.0.1",
|
27
28
|
"@vitejs/plugin-vue-jsx": "^5.0.1",
|
28
29
|
"cross-env": "^10.0.0",
|
29
30
|
"less": "^4.1.2",
|
31
|
+
"autoprefixer": "^10.4.5",
|
32
|
+
"postcss": "^8.4.35",
|
33
|
+
"postcss-html": "^1.6.0",
|
34
|
+
"postcss-less": "^6.0.0",
|
30
35
|
"typescript": "~5.8.3",
|
36
|
+
"unocss": "^66.4.2",
|
37
|
+
"rollup-plugin-visualizer": "^6.0.0",
|
31
38
|
"unplugin-auto-import": "^20.0.0",
|
32
39
|
"unplugin-turbo-console": "^2.2.0",
|
33
40
|
"unplugin-vue-components": "^29.0.0",
|
34
|
-
"vite": "
|
41
|
+
"vite": "npm:rolldown-vite@latest",
|
35
42
|
"vite-plugin-vue-devtools": "^8.0.0",
|
36
43
|
"vue-tsc": "^3.0.5"
|
37
44
|
}
|
@@ -5,16 +5,16 @@ import HelloWorld from './components/HelloWorld.vue'
|
|
5
5
|
<template>
|
6
6
|
<div>
|
7
7
|
<a href="https://vite.dev" target="_blank">
|
8
|
-
<img src="/vite.svg" class="logo" alt="Vite logo"
|
8
|
+
<img src="/vite.svg" class="logo" alt="Vite logo">
|
9
9
|
</a>
|
10
10
|
<a href="https://vuejs.org/" target="_blank">
|
11
|
-
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo"
|
11
|
+
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo">
|
12
12
|
</a>
|
13
13
|
</div>
|
14
14
|
<HelloWorld msg="Vite + Vue" />
|
15
15
|
</template>
|
16
16
|
|
17
|
-
<style scoped>
|
17
|
+
<style lang="less" scoped>
|
18
18
|
.logo {
|
19
19
|
height: 6em;
|
20
20
|
padding: 1.5em;
|
@@ -10,7 +10,9 @@ const count = ref(0)
|
|
10
10
|
<h1>{{ msg }}</h1>
|
11
11
|
|
12
12
|
<div class="card">
|
13
|
-
<button type="button" @click="count++">
|
13
|
+
<button type="button" @click="count++">
|
14
|
+
count is {{ count }}
|
15
|
+
</button>
|
14
16
|
<p>
|
15
17
|
Edit
|
16
18
|
<code>components/HelloWorld.vue</code> to test HMR
|
@@ -19,19 +21,18 @@ const count = ref(0)
|
|
19
21
|
|
20
22
|
<p>
|
21
23
|
Check out
|
22
|
-
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
23
|
-
>create-vue</a
|
24
|
-
>, the official Vue + Vite starter
|
24
|
+
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the official Vue + Vite starter
|
25
25
|
</p>
|
26
26
|
<p>
|
27
27
|
Learn more about IDE Support for Vue in the
|
28
28
|
<a
|
29
29
|
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
30
30
|
target="_blank"
|
31
|
-
|
32
|
-
|
31
|
+
>Vue Docs Scaling up Guide</a>.
|
32
|
+
</p>
|
33
|
+
<p class="read-the-docs">
|
34
|
+
Click on the Vite and Vue logos to learn more
|
33
35
|
</p>
|
34
|
-
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
35
36
|
</template>
|
36
37
|
|
37
38
|
<style scoped>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
:root {
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
3
|
+
line-height: 1.5;
|
4
|
+
font-weight: 400;
|
5
|
+
|
6
|
+
color-scheme: light dark;
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
8
|
+
background-color: #242424;
|
9
|
+
|
10
|
+
font-synthesis: none;
|
11
|
+
text-rendering: optimizeLegibility;
|
12
|
+
-webkit-font-smoothing: antialiased;
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
14
|
+
}
|
15
|
+
|
16
|
+
a {
|
17
|
+
font-weight: 500;
|
18
|
+
color: #646cff;
|
19
|
+
text-decoration: inherit;
|
20
|
+
}
|
21
|
+
a:hover {
|
22
|
+
color: #535bf2;
|
23
|
+
}
|
24
|
+
|
25
|
+
body {
|
26
|
+
margin: 0;
|
27
|
+
display: flex;
|
28
|
+
place-items: center;
|
29
|
+
min-width: 320px;
|
30
|
+
min-height: 100vh;
|
31
|
+
}
|
32
|
+
|
33
|
+
h1 {
|
34
|
+
font-size: 3.2em;
|
35
|
+
line-height: 1.1;
|
36
|
+
}
|
37
|
+
|
38
|
+
button {
|
39
|
+
border-radius: 8px;
|
40
|
+
border: 1px solid transparent;
|
41
|
+
padding: 0.6em 1.2em;
|
42
|
+
font-size: 1em;
|
43
|
+
font-weight: 500;
|
44
|
+
font-family: inherit;
|
45
|
+
background-color: #1a1a1a;
|
46
|
+
cursor: pointer;
|
47
|
+
transition: border-color 0.25s;
|
48
|
+
}
|
49
|
+
button:hover {
|
50
|
+
border-color: #646cff;
|
51
|
+
}
|
52
|
+
button:focus,
|
53
|
+
button:focus-visible {
|
54
|
+
outline: 4px auto -webkit-focus-ring-color;
|
55
|
+
}
|
56
|
+
|
57
|
+
.card {
|
58
|
+
padding: 2em;
|
59
|
+
}
|
60
|
+
|
61
|
+
#app {
|
62
|
+
max-width: 1280px;
|
63
|
+
margin: 0 auto;
|
64
|
+
padding: 2rem;
|
65
|
+
text-align: center;
|
66
|
+
}
|
67
|
+
|
68
|
+
@media (prefers-color-scheme: light) {
|
69
|
+
:root {
|
70
|
+
color: #213547;
|
71
|
+
background-color: #ffffff;
|
72
|
+
}
|
73
|
+
a:hover {
|
74
|
+
color: #747bff;
|
75
|
+
}
|
76
|
+
button {
|
77
|
+
background-color: #f9f9f9;
|
78
|
+
}
|
79
|
+
}
|
@@ -0,0 +1,15 @@
|
|
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
|
+
HelloWorld: typeof import('./../src/components/HelloWorld.vue')['default']
|
12
|
+
RouterLink: typeof import('vue-router')['RouterLink']
|
13
|
+
RouterView: typeof import('vue-router')['RouterView']
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,78 @@
|
|
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,31 +0,0 @@
|
|
1
|
-
import type { Plugin } from 'vite'
|
2
|
-
|
3
|
-
import compressPlugin from 'vite-plugin-compression'
|
4
|
-
|
5
|
-
export function configCompressPlugin(
|
6
|
-
compress: 'gzip' | 'brotli' | 'none',
|
7
|
-
deleteOriginFile = false
|
8
|
-
): Plugin | Plugin[] {
|
9
|
-
const compressList = compress.split(',')
|
10
|
-
|
11
|
-
const plugins: Plugin[] = []
|
12
|
-
|
13
|
-
if (compressList.includes('gzip')) {
|
14
|
-
plugins.push(
|
15
|
-
compressPlugin({
|
16
|
-
ext: '.gz',
|
17
|
-
deleteOriginFile
|
18
|
-
})
|
19
|
-
)
|
20
|
-
}
|
21
|
-
if (compressList.includes('brotli')) {
|
22
|
-
plugins.push(
|
23
|
-
compressPlugin({
|
24
|
-
ext: '.br',
|
25
|
-
algorithm: 'brotliCompress',
|
26
|
-
deleteOriginFile
|
27
|
-
})
|
28
|
-
)
|
29
|
-
}
|
30
|
-
return plugins
|
31
|
-
}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import type { PluginOption } from 'vite'
|
2
|
-
import { createHtmlPlugin } from 'vite-plugin-html'
|
3
|
-
|
4
|
-
import { defaultSettings } from '../../../../config'
|
5
|
-
import pkg from '../../../../package.json'
|
6
|
-
import cdnModules from '../cdn'
|
7
|
-
|
8
|
-
const { cdn, system } = defaultSettings
|
9
|
-
|
10
|
-
export function configHtmlPlugin(_: ViteEnv, isBuild: boolean) {
|
11
|
-
const htmlPlugin: PluginOption[] = createHtmlPlugin({
|
12
|
-
minify: isBuild,
|
13
|
-
inject: {
|
14
|
-
// Inject data into ejs template
|
15
|
-
data: {
|
16
|
-
VUE_APP_TITLE: system.title,
|
17
|
-
VUE_APP_VERSION: pkg.version,
|
18
|
-
injectScript: cdn.use && isBuild ? cdnModules.map(e => e.js).filter(el => el) : [],
|
19
|
-
injectLink: cdn.use && isBuild ? cdnModules.map(e => e.css).filter(el => el) : [],
|
20
|
-
}
|
21
|
-
},
|
22
|
-
})
|
23
|
-
return htmlPlugin
|
24
|
-
}
|