@wangyao-test/vue-element-template 1.0.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.
Files changed (38) hide show
  1. package/package.json +14 -0
  2. package/template/.github/workflows/ci.yml +27 -0
  3. package/template/.github/workflows/gh-pages.yml +57 -0
  4. package/template/.vscode/extensions.json +3 -0
  5. package/template/.vscode/settings.json +36 -0
  6. package/template/README.md +47 -0
  7. package/template/eslint.config.js +7 -0
  8. package/template/index.html +18 -0
  9. package/template/package.json +40 -0
  10. package/template/pnpm-lock.yaml +5757 -0
  11. package/template/public/CNAME +1 -0
  12. package/template/public/element-plus-logo-small.svg +1 -0
  13. package/template/public/favicon.svg +1 -0
  14. package/template/public/vite.svg +1 -0
  15. package/template/src/App.vue +22 -0
  16. package/template/src/assets/vue.svg +1 -0
  17. package/template/src/components/HelloWorld.vue +127 -0
  18. package/template/src/components/Logos.vue +31 -0
  19. package/template/src/components/MessageBoxDemo.vue +24 -0
  20. package/template/src/components/layouts/BaseHeader.vue +73 -0
  21. package/template/src/components/layouts/BaseSide.vue +85 -0
  22. package/template/src/components.d.ts +29 -0
  23. package/template/src/composables/dark.ts +4 -0
  24. package/template/src/composables/index.ts +1 -0
  25. package/template/src/env.d.ts +8 -0
  26. package/template/src/main.ts +46 -0
  27. package/template/src/pages/index.vue +4 -0
  28. package/template/src/pages/nav/1/item-1.vue +5 -0
  29. package/template/src/pages/nav/2.vue +5 -0
  30. package/template/src/pages/nav/4.vue +5 -0
  31. package/template/src/styles/element/dark.scss +11 -0
  32. package/template/src/styles/element/index.scss +42 -0
  33. package/template/src/styles/index.scss +40 -0
  34. package/template/src/typed-router.d.ts +26 -0
  35. package/template/src/types.ts +3 -0
  36. package/template/tsconfig.json +27 -0
  37. package/template/uno.config.ts +37 -0
  38. package/template/vite.config.ts +59 -0
@@ -0,0 +1,37 @@
1
+ import {
2
+ defineConfig,
3
+ presetAttributify,
4
+ presetIcons,
5
+ presetTypography,
6
+ presetUno,
7
+ presetWebFonts,
8
+ transformerDirectives,
9
+ transformerVariantGroup,
10
+ } from 'unocss'
11
+
12
+ export default defineConfig({
13
+ shortcuts: [
14
+ ['btn', 'px-4 py-1 rounded inline-block bg-teal-700 text-white cursor-pointer !outline-none hover:bg-teal-800 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
15
+ ['icon-btn', 'inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-teal-600'],
16
+ ],
17
+ presets: [
18
+ presetUno(),
19
+ presetAttributify(),
20
+ presetIcons({
21
+ scale: 1.2,
22
+ }),
23
+ presetTypography(),
24
+ presetWebFonts({
25
+ fonts: {
26
+ sans: 'DM Sans',
27
+ serif: 'DM Serif Display',
28
+ mono: 'DM Mono',
29
+ },
30
+ }),
31
+ ],
32
+ transformers: [
33
+ transformerDirectives(),
34
+ transformerVariantGroup(),
35
+ ],
36
+ safelist: 'prose prose-sm m-auto text-left'.split(' '),
37
+ })
@@ -0,0 +1,59 @@
1
+ import path from 'node:path'
2
+ import Vue from '@vitejs/plugin-vue'
3
+
4
+ import Unocss from 'unocss/vite'
5
+ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
6
+ import Components from 'unplugin-vue-components/vite'
7
+ import VueRouter from 'unplugin-vue-router/vite'
8
+
9
+ import { defineConfig } from 'vite'
10
+
11
+ // https://vitejs.dev/config/
12
+ export default defineConfig({
13
+ resolve: {
14
+ alias: {
15
+ '~/': `${path.resolve(__dirname, 'src')}/`,
16
+ },
17
+ },
18
+
19
+ css: {
20
+ preprocessorOptions: {
21
+ scss: {
22
+ additionalData: `@use "~/styles/element/index.scss" as *;`,
23
+ api: 'modern-compiler',
24
+ },
25
+ },
26
+ },
27
+
28
+ plugins: [
29
+ Vue(),
30
+
31
+ // https://github.com/posva/unplugin-vue-router
32
+ VueRouter({
33
+ extensions: ['.vue', '.md'],
34
+ dts: 'src/typed-router.d.ts',
35
+ }),
36
+
37
+ Components({
38
+ // allow auto load markdown components under `./src/components/`
39
+ extensions: ['vue', 'md'],
40
+ // allow auto import and register components used in markdown
41
+ include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
42
+ resolvers: [
43
+ ElementPlusResolver({
44
+ importStyle: 'sass',
45
+ }),
46
+ ],
47
+ dts: 'src/components.d.ts',
48
+ }),
49
+
50
+ // https://github.com/antfu/unocss
51
+ // see uno.config.ts for config
52
+ Unocss(),
53
+ ],
54
+
55
+ ssr: {
56
+ // TODO: workaround until they support native ESM
57
+ noExternal: ['element-plus'],
58
+ },
59
+ })