create-young-proj 1.2.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +6 -1
  3. package/dist/index.mjs +12 -12
  4. package/package.json +1 -1
  5. package/src/index.ts +6 -1
  6. package/template-nuxt-admin/env.d.ts +19 -1
  7. package/template-nuxt-admin/nuxt.config.ts +4 -2
  8. package/template-nuxt-admin/server/plugins/env.ts +0 -1
  9. package/template-nuxt-website/README.md +4 -0
  10. package/template-nuxt-website/composables/utils.ts +0 -4
  11. package/template-nuxt-website/env.d.ts +18 -1
  12. package/template-nuxt-website/nuxt.config.ts +3 -2
  13. package/template-nuxt-website/package.json +4 -5
  14. package/template-nuxt-website/server/api/get_footer_info.get.ts +3 -3
  15. package/template-nuxt-website/server/api/get_gray_status.get.ts +1 -0
  16. package/template-nuxt-website/server/api/get_head_nav.get.ts +1 -1
  17. package/template-nuxt-website/server/api/get_home_banner.get.ts +2 -2
  18. package/template-nuxt-website/server/routes/get/env.ts +13 -0
  19. package/template-nuxt-website/yarn.lock +1173 -1599
  20. package/template-uni-app/.vscode/vue-html.code-snippets +2 -7
  21. package/template-uni-app/README.md +2 -0
  22. package/template-uni-app/_env +1 -1
  23. package/template-uni-app/auto-imports.d.ts +718 -1
  24. package/template-uni-app/custom-plugins/multiconf.ts +13 -2
  25. package/template-uni-app/eslint.config.js +3 -1
  26. package/template-uni-app/package.json +11 -9
  27. package/template-uni-app/pnpm-lock.yaml +531 -866
  28. package/template-uni-app/src/manifest.json +1 -1
  29. package/template-uni-app/src/pages/index.vue +12 -9
  30. package/template-uni-app/src/pages/my.vue +6 -9
  31. package/template-uni-app/src/pages.json +1 -1
  32. package/template-uni-app/uni-pages.d.ts +24 -0
  33. package/template-uni-app/vite.config.ts +6 -3
  34. package/template-vitepress/.vitepress/components/HomePage.vue +54 -0
  35. package/template-vitepress/.vitepress/components/TodoItem.vue +16 -0
  36. package/template-vitepress/.vitepress/components.d.ts +13 -0
  37. package/template-vitepress/.vitepress/config.mts +159 -0
  38. package/template-vitepress/.vitepress/theme/index.ts +26 -0
  39. package/template-vitepress/.vitepress/theme/style.css +139 -0
  40. package/template-vitepress/Dockerfile +41 -0
  41. package/template-vitepress/README.md +102 -0
  42. package/template-vitepress/_gitignore +6 -0
  43. package/template-vitepress/_npmrc +2 -0
  44. package/template-vitepress/_nvmrc +1 -0
  45. package/template-vitepress/boot.mjs +17 -0
  46. package/template-vitepress/index.md +53 -0
  47. package/template-vitepress/nitro.config.ts +19 -0
  48. package/template-vitepress/package.json +26 -0
  49. package/template-vitepress/plugins/init.ts +204 -0
  50. package/template-vitepress/tsconfig.json +3 -0
  51. package/template-vitepress/vite.config.ts +66 -0
  52. package/template-uni-app/.eslintignore +0 -1
  53. package/template-uni-app/.eslintrc +0 -16
@@ -72,4 +72,4 @@
72
72
  "enable": false
73
73
  },
74
74
  "vueVersion": "3"
75
- }
75
+ }
@@ -1,17 +1,14 @@
1
1
  <!--
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-07-18 11:23:36
4
- * @LastEditTime: 2023-08-25 16:39:24
4
+ * @LastEditTime: 2023-11-15 11:04:49
5
5
  * @Description:
6
6
  -->
7
- <route lang="json">
8
- {
9
- "needLogin": true,
10
- "layout": "tabbar",
11
- "navbar": {
12
- "isback": false
13
- }
14
- }
7
+ <route lang="yaml">
8
+ needLogin: true
9
+ layout: tabbar
10
+ navbar:
11
+ isback: false
15
12
  </route>
16
13
 
17
14
  <script lang="ts" setup>
@@ -27,6 +24,8 @@ async function testPost() {
27
24
  const { fullscreenLoading } = storeToRefs(useHttpLoading())
28
25
  fullscreenLoading.value = true
29
26
 
27
+ const netWorkStatus = useNetwork()
28
+
30
29
  setTimeout(() => {
31
30
  fullscreenLoading.value = false
32
31
  }, 3e3)
@@ -56,6 +55,10 @@ setTimeout(() => {
56
55
  点我测试 Post 请求
57
56
  </button>
58
57
 
58
+ {{
59
+ netWorkStatus
60
+ }}
61
+
59
62
  <uni-card
60
63
  title="基础卡片" sub-title="副标题" extra="额外信息"
61
64
  thumbnail="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" @click="to(Pages.测试子页面)"
@@ -1,17 +1,14 @@
1
1
  <!--
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-07-18 17:53:43
4
- * @LastEditTime: 2023-08-25 16:39:28
4
+ * @LastEditTime: 2023-11-13 12:13:47
5
5
  * @Description:
6
6
  -->
7
- <route lang="json">
8
- {
9
- "needLogin": true,
10
- "layout": "tabbar",
11
- "navbar": {
12
- "isback": false
13
- }
14
- }
7
+ <route lang="yaml">
8
+ needLogin: true
9
+ layout: tabbar
10
+ navbar:
11
+ isback: false
15
12
  </route>
16
13
 
17
14
  <script lang="ts" setup>
@@ -71,4 +71,4 @@
71
71
  }
72
72
  },
73
73
  "subPackages": []
74
- }
74
+ }
@@ -0,0 +1,24 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // Generated by vite-plugin-uni-pages
5
+
6
+ interface NavigateToOptions {
7
+ url: "pages/index" |
8
+ "pages/my" |
9
+ "pages/demo/index";
10
+ }
11
+ interface RedirectToOptions extends NavigateToOptions {}
12
+
13
+ interface SwitchTabOptions {
14
+ url: "pages/index" | "pages/my"
15
+ }
16
+
17
+ type ReLaunchOptions = NavigateToOptions | SwitchTabOptions;
18
+
19
+ declare interface Uni {
20
+ navigateTo(options: UniNamespace.NavigateToOptions & NavigateToOptions): void;
21
+ redirectTo(options: UniNamespace.RedirectToOptions & RedirectToOptions): void;
22
+ switchTab(options: UniNamespace.SwitchTabOptions & SwitchTabOptions): void;
23
+ reLaunch(options: UniNamespace.ReLaunchOptions & ReLaunchOptions): void;
24
+ }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author: zhangyang
3
3
  * @Date: 2023-07-18 11:03:01
4
- * @LastEditTime: 2023-09-19 10:18:06
4
+ * @LastEditTime: 2023-11-15 11:08:28
5
5
  * @Description:
6
6
  */
7
7
  import { resolve } from 'node:path'
@@ -15,6 +15,7 @@ import UniManifest from '@uni-helper/vite-plugin-uni-manifest'
15
15
  import Unocss from 'unocss/vite'
16
16
  import AutoImport from 'unplugin-auto-import/vite'
17
17
  import AutoComponents from 'unplugin-vue-components/vite'
18
+ import { UniUseAutoImports } from '@uni-helper/uni-use'
18
19
  import { multiConf } from './custom-plugins'
19
20
 
20
21
  // https://vitejs.dev/config/
@@ -40,13 +41,15 @@ export default ({ command, mode }: ConfigEnv) => {
40
41
  UniLayouts(),
41
42
  // https://uni-helper.js.org/vite-plugin-uni-manifest
42
43
  UniManifest(),
43
- Uni(),
44
+ // hack
45
+ // @ts-expect-error packages.json 中 type: "module" 会造成这里解析的不同
46
+ Uni.default(),
44
47
  // https://github.com/antfu/unocss
45
48
  Unocss(),
46
49
 
47
50
  // https://github.com/antfu/unplugin-auto-import
48
51
  AutoImport({
49
- imports: ['vue', 'uni-app', 'pinia'],
52
+ imports: ['vue', 'uni-app', 'pinia', '@vueuse/core', UniUseAutoImports],
50
53
  dts: true,
51
54
  vueTemplate: true,
52
55
  dirs: [
@@ -0,0 +1,54 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-11-08 16:13:01
4
+ * @LastEditTime: 2023-11-27 15:12:50
5
+ * @Description:
6
+ -->
7
+ <script setup lang="ts">
8
+ import { VPTeamMembers } from 'vitepress/theme'
9
+
10
+ const teamMembers = [
11
+ {
12
+ avatar: 'https://foruda.gitee.com/avatar/1677049688917634099/5384684_bluseyoung-web_1578985791.png',
13
+ name: 'BluesYoung-web',
14
+ title: 'Creator, 沉迷代码无法自拔',
15
+ links: [
16
+ {
17
+ icon: 'github',
18
+ link: 'https://github.com/BluesYoung-web',
19
+ },
20
+ {
21
+ icon: {
22
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="#C71D23" d="M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12a12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296Z"/></svg>'
23
+ },
24
+ link: 'https://gitee.com/BluesYoung-web',
25
+ },
26
+ {
27
+ icon: {
28
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"><g fill="none"><rect width="30" height="22" x="1" y="5" fill="#B4ACBC" rx="1.5"/><rect width="28" height="18" x="2" y="7" fill="#CDC4D6" rx="1"/><path fill="#E1D8EC" d="m30 23.4l-12.971-7.782a2 2 0 0 0-2.058 0L2 23.4V25a1 1 0 0 0 1 1h26a1 1 0 0 0 1-1v-1.6Z"/><path fill="#998EA4" d="M2 9.766V8h28v1.766L17.544 17.24a3 3 0 0 1-3.088 0L2 9.766Z"/><path fill="#F3EEF8" d="M2 8.6V7a1 1 0 0 1 1-1h26a1 1 0 0 1 1 1v1.6l-12.971 7.783a2 2 0 0 1-2.058 0L2 8.6Z"/><path fill="#00A6ED" d="M16 23a7 7 0 1 0 0-14a7 7 0 0 0 0 14Z"/><path fill="#F4F4F4" d="M16 11.5c-1.21-.02-2.36.44-3.22 1.3c-.87.85-1.34 1.99-1.34 3.2c0 2.48 2.02 4.5 4.5 4.5a.47.47 0 1 0 0-.94c-1.96 0-3.56-1.6-3.56-3.56c0-.96.38-1.86 1.06-2.53c.68-.67 1.59-1.03 2.55-1.03c1.93.03 3.51 1.65 3.51 3.62v.81a.67.67 0 0 1-1.34 0v-3.08a.47.47 0 0 0-.47-.47c-.26 0-.49.21-.49.47v.09c-.44-.35-.99-.57-1.6-.57c-1.4 0-2.54 1.14-2.54 2.54c0 1.4 1.14 2.54 2.54 2.54c.7 0 1.34-.29 1.8-.75c.28.5.81.84 1.42.84c.89 0 1.62-.73 1.62-1.62v-.81c0-2.47-1.99-4.52-4.44-4.55Zm-.39 5.96c-.88 0-1.6-.72-1.6-1.6c0-.88.72-1.6 1.6-1.6c.88 0 1.6.72 1.6 1.6c0 .88-.72 1.6-1.6 1.6Z"/></g></svg>'
29
+ },
30
+ link: 'mailto:bluesyoung_web@163.com',
31
+ },
32
+ ]
33
+ },
34
+ ]
35
+ </script>
36
+
37
+ <template>
38
+ <div class="container mx-auto">
39
+ <div class="content-container">
40
+ <main class="main">
41
+ <div class="vp-doc" flex flex-col items-center mt-10>
42
+ <h2 id="meet-the-team" op50 font-normal p="t-10 b-2">
43
+ 贡献者
44
+ </h2>
45
+ <div w-full p-10 :class="{
46
+ 'flex justify-center items-center': teamMembers.length === 1
47
+ }">
48
+ <VPTeamMembers :members="teamMembers" />
49
+ </div>
50
+ </div>
51
+ </main>
52
+ </div>
53
+ </div>
54
+ </template>
@@ -0,0 +1,16 @@
1
+ <!--
2
+ * @Author: zhangyang
3
+ * @Date: 2023-11-17 10:56:27
4
+ * @LastEditTime: 2023-11-17 14:05:37
5
+ * @Description:
6
+ -->
7
+ <script lang="ts" setup>
8
+ import { ref } from 'vue'
9
+ const checked = ref(false)
10
+ </script>
11
+ <template>
12
+ <div class="flex items-center cursor-pointer my-2" @click="checked = !checked">
13
+ <div class="mr-2">{{ checked ? '✅' : '⬜️' }}</div>
14
+ <slot />
15
+ </div>
16
+ </template>
@@ -0,0 +1,13 @@
1
+ /* eslint-disable */
2
+ /* prettier-ignore */
3
+ // @ts-nocheck
4
+ // Generated by unplugin-vue-components
5
+ // Read more: https://github.com/vuejs/core/pull/3399
6
+ export {}
7
+
8
+ declare module 'vue' {
9
+ export interface GlobalComponents {
10
+ HomePage: typeof import('./components/HomePage.vue')['default']
11
+ TodoItem: typeof import('./components/TodoItem.vue')['default']
12
+ }
13
+ }
@@ -0,0 +1,159 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-11-08 15:46:58
4
+ * @LastEditTime: 2023-11-27 11:18:38
5
+ * @Description:
6
+ */
7
+ import { defineConfig } from 'vitepress'
8
+
9
+ // https://vitepress.dev/reference/site-config
10
+ export default defineConfig({
11
+ title: '前端知识库',
12
+ description: '多种实用工具,满足不同需求',
13
+ lang: 'zh-CN',
14
+ locales: {
15
+ root: {
16
+ label: '简体中文',
17
+ lang: 'zh',
18
+ }
19
+ },
20
+ base: '/wlb/fe/',
21
+ lastUpdated: true,
22
+ themeConfig: {
23
+ search: {
24
+ provider: 'local',
25
+ options: {
26
+ detailedView: true,
27
+ translations: {
28
+ button: {
29
+ buttonText: '搜索文档',
30
+ buttonAriaLabel: '搜索文档'
31
+ },
32
+ modal: {
33
+ noResultsText: '无法找到相关结果',
34
+ resetButtonTitle: '清除查询条件',
35
+ displayDetails: '显示详细信息',
36
+ footer: {
37
+ selectText: '选择',
38
+ navigateText: '切换',
39
+ closeText: '关闭'
40
+ }
41
+ }
42
+ },
43
+ }
44
+ },
45
+
46
+ // https://vitepress.dev/reference/default-theme-config
47
+ nav: [
48
+ { text: '快速开始', link: '/newer' },
49
+ { text: '通用知识', link: '/common/dev-env', activeMatch: '^/common/' },
50
+ ],
51
+
52
+ docFooter: {
53
+ prev: '上一篇',
54
+ next: '下一篇',
55
+ },
56
+
57
+ outline: {
58
+ label: '本页目录',
59
+ },
60
+
61
+ lastUpdatedText: '最后更新时间',
62
+
63
+ sidebarMenuLabel: '菜单',
64
+
65
+ footer: {
66
+ message: 'Released under the MIT License.',
67
+ copyright: 'Copyright © 2023-PRESENT BluesYoung-web',
68
+ },
69
+
70
+ sidebar: {
71
+ '/': [
72
+ {
73
+ text: '快速开始',
74
+ items: [
75
+ { text: '新人必读', link: '/newer' },
76
+ { text: '前端规范', link: '/standards' },
77
+ { text: '常见问题及解决方案', link: '/problems' },
78
+ ]
79
+ },
80
+ {
81
+ text: '通用知识',
82
+ base: '/common/',
83
+ items: [
84
+ { text: '1. 开发环境', link: 'dev-env' },
85
+ { text: '2. 开发必备知识点', link: 'basic-knowledge' },
86
+ { text: '3. 常用 vite 插件', link: 'vite-plugin' },
87
+ ]
88
+ },
89
+ {
90
+ text: '项目脚手架与模板介绍',
91
+ base: '/templates/',
92
+ items: [
93
+ { text: '1. 使用方法', link: 'how-to-use' },
94
+ { text: '2. template-nuxt-admin', link: 'nuxt-admin' },
95
+ { text: '3. template-nuxt-website', link: 'nuxt-website' },
96
+ { text: '4. template-uni-app', link: 'uni-app' },
97
+ { text: '5. template-vue-thin', link: 'vue-thin' },
98
+ { text: '6. template-vue-mobile', link: 'vue-mobile' },
99
+ { text: '7. template-admin-server', link: 'admin-server' },
100
+ ]
101
+ },
102
+ {
103
+ text: '项目部署',
104
+ items: [
105
+ { text: '使用 Docker 部署项目', link: '/common/project-deploy' },
106
+ ]
107
+ },
108
+ ],
109
+ '/libs/': [
110
+ {
111
+ text: '开源',
112
+ base: '/libs/public/',
113
+ items: [
114
+ { text: 'ui-vue3-element-plus', link: 'ui-vue3-element-plus' },
115
+ { text: 'http', link: 'http' },
116
+ { text: 'logger', link: 'logger' },
117
+ { text: 'rpc', link: 'rpc' },
118
+ { text: 'ui-vue3', link: 'ui-vue3' },
119
+ ],
120
+ collapsed: true
121
+ },
122
+ {
123
+ text: '内部',
124
+ base: '/libs/private/',
125
+ items: [
126
+ { text: '来游戏平台-通行证 JSSDK', link: 'lyx-js-sdk' },
127
+ { text: '悬浮球', link: 'young-float-ball' },
128
+ ]
129
+ }
130
+ ],
131
+ },
132
+
133
+ socialLinks: [
134
+ {
135
+ icon: {
136
+ svg: '<svg xmlns="http://www.w3.org/2000/svg" width="1.09em" height="1em" viewBox="0 0 256 236"><path fill="#E24329" d="m128.075 236.075l47.104-144.97H80.97l47.104 144.97Z"/><path fill="#FC6D26" d="M128.075 236.074L80.97 91.104H14.956l113.119 144.97Z"/><path fill="#FCA326" d="M14.956 91.104L.642 135.16a9.752 9.752 0 0 0 3.542 10.903l123.891 90.012l-113.12-144.97Z"/><path fill="#E24329" d="M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0l-28.37 87.315Z"/><path fill="#FC6D26" d="m128.075 236.074l47.104-144.97h66.015l-113.12 144.97Z"/><path fill="#FCA326" d="m241.194 91.104l14.314 44.056a9.752 9.752 0 0 1-3.543 10.903l-123.89 90.012l113.119-144.97Z"/><path fill="#E24329" d="M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0l28.37 87.315Z"/></svg>'
137
+ },
138
+ link: 'gitlab仓库的完整地址',
139
+ },
140
+ ],
141
+
142
+ editLink: {
143
+ pattern: 'https://gitlab地址/-/ide/project/此处换成仓库的具体路径/edit/master/-/:path',
144
+ text: '在 gitlab 上编辑此页'
145
+ }
146
+ },
147
+ head: [
148
+ ['link', { rel: 'icon', href: 'https://api.iconify.design/noto:rocket.svg?color=%2312b2e7' }]
149
+ ],
150
+ markdown: {
151
+ container: {
152
+ tipLabel: '提示',
153
+ warningLabel: '注意',
154
+ dangerLabel: '警告',
155
+ detailsLabel: '详细信息',
156
+ infoLabel: '信息',
157
+ }
158
+ },
159
+ })
@@ -0,0 +1,26 @@
1
+ /*
2
+ * @Author: zhangyang
3
+ * @Date: 2023-11-08 16:14:48
4
+ * @LastEditTime: 2023-11-08 16:39:59
5
+ * @Description:
6
+ */
7
+ // https://vitepress.dev/guide/custom-theme
8
+ import { h } from 'vue'
9
+ import type { Theme } from 'vitepress'
10
+ import DefaultTheme from 'vitepress/theme'
11
+ import './style.css'
12
+ import HomePage from '../components/HomePage.vue'
13
+ import 'uno.css'
14
+
15
+ export default {
16
+ extends: DefaultTheme,
17
+ Layout: () => {
18
+ return h(DefaultTheme.Layout, null, {
19
+ // https://vitepress.dev/guide/extending-default-theme#layout-slots
20
+ 'home-features-after': () => h(HomePage),
21
+ })
22
+ },
23
+ enhanceApp({ app, router, siteData }) {
24
+ // ...
25
+ }
26
+ } satisfies Theme
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Customize default theme styling by overriding CSS variables:
3
+ * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
4
+ */
5
+
6
+ /**
7
+ * Colors
8
+ *
9
+ * Each colors have exact same color scale system with 3 levels of solid
10
+ * colors with different brightness, and 1 soft color.
11
+ *
12
+ * - `XXX-1`: The most solid color used mainly for colored text. It must
13
+ * satisfy the contrast ratio against when used on top of `XXX-soft`.
14
+ *
15
+ * - `XXX-2`: The color used mainly for hover state of the button.
16
+ *
17
+ * - `XXX-3`: The color for solid background, such as bg color of the button.
18
+ * It must satisfy the contrast ratio with pure white (#ffffff) text on
19
+ * top of it.
20
+ *
21
+ * - `XXX-soft`: The color used for subtle background such as custom container
22
+ * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
23
+ * on top of it.
24
+ *
25
+ * The soft color must be semi transparent alpha channel. This is crucial
26
+ * because it allows adding multiple "soft" colors on top of each other
27
+ * to create a accent, such as when having inline code block inside
28
+ * custom containers.
29
+ *
30
+ * - `default`: The color used purely for subtle indication without any
31
+ * special meanings attched to it such as bg color for menu hover state.
32
+ *
33
+ * - `brand`: Used for primary brand colors, such as link text, button with
34
+ * brand theme, etc.
35
+ *
36
+ * - `tip`: Used to indicate useful information. The default theme uses the
37
+ * brand color for this by default.
38
+ *
39
+ * - `warning`: Used to indicate warning to the users. Used in custom
40
+ * container, badges, etc.
41
+ *
42
+ * - `danger`: Used to show error, or dangerous message to the users. Used
43
+ * in custom container, badges, etc.
44
+ * -------------------------------------------------------------------------- */
45
+
46
+ :root {
47
+ --vp-c-default-1: var(--vp-c-gray-1);
48
+ --vp-c-default-2: var(--vp-c-gray-2);
49
+ --vp-c-default-3: var(--vp-c-gray-3);
50
+ --vp-c-default-soft: var(--vp-c-gray-soft);
51
+
52
+ --vp-c-brand-1: var(--vp-c-indigo-1);
53
+ --vp-c-brand-2: var(--vp-c-indigo-2);
54
+ --vp-c-brand-3: var(--vp-c-indigo-3);
55
+ --vp-c-brand-soft: var(--vp-c-indigo-soft);
56
+
57
+ --vp-c-tip-1: var(--vp-c-brand-1);
58
+ --vp-c-tip-2: var(--vp-c-brand-2);
59
+ --vp-c-tip-3: var(--vp-c-brand-3);
60
+ --vp-c-tip-soft: var(--vp-c-brand-soft);
61
+
62
+ --vp-c-warning-1: var(--vp-c-yellow-1);
63
+ --vp-c-warning-2: var(--vp-c-yellow-2);
64
+ --vp-c-warning-3: var(--vp-c-yellow-3);
65
+ --vp-c-warning-soft: var(--vp-c-yellow-soft);
66
+
67
+ --vp-c-danger-1: var(--vp-c-red-1);
68
+ --vp-c-danger-2: var(--vp-c-red-2);
69
+ --vp-c-danger-3: var(--vp-c-red-3);
70
+ --vp-c-danger-soft: var(--vp-c-red-soft);
71
+ }
72
+
73
+ /**
74
+ * Component: Button
75
+ * -------------------------------------------------------------------------- */
76
+
77
+ :root {
78
+ --vp-button-brand-border: transparent;
79
+ --vp-button-brand-text: var(--vp-c-white);
80
+ --vp-button-brand-bg: var(--vp-c-brand-3);
81
+ --vp-button-brand-hover-border: transparent;
82
+ --vp-button-brand-hover-text: var(--vp-c-white);
83
+ --vp-button-brand-hover-bg: var(--vp-c-brand-2);
84
+ --vp-button-brand-active-border: transparent;
85
+ --vp-button-brand-active-text: var(--vp-c-white);
86
+ --vp-button-brand-active-bg: var(--vp-c-brand-1);
87
+ }
88
+
89
+ /**
90
+ * Component: Home
91
+ * -------------------------------------------------------------------------- */
92
+
93
+ :root {
94
+ --vp-home-hero-name-color: transparent;
95
+ --vp-home-hero-name-background: -webkit-linear-gradient(
96
+ 120deg,
97
+ #bd34fe 30%,
98
+ #41d1ff
99
+ );
100
+
101
+ --vp-home-hero-image-background-image: linear-gradient(
102
+ -45deg,
103
+ #bd34fe 50%,
104
+ #47caff 50%
105
+ );
106
+ --vp-home-hero-image-filter: blur(44px);
107
+ }
108
+
109
+ @media (min-width: 640px) {
110
+ :root {
111
+ --vp-home-hero-image-filter: blur(56px);
112
+ }
113
+ }
114
+
115
+ @media (min-width: 960px) {
116
+ :root {
117
+ --vp-home-hero-image-filter: blur(68px);
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Component: Custom Block
123
+ * -------------------------------------------------------------------------- */
124
+
125
+ :root {
126
+ --vp-custom-block-tip-border: transparent;
127
+ --vp-custom-block-tip-text: var(--vp-c-text-1);
128
+ --vp-custom-block-tip-bg: var(--vp-c-brand-soft);
129
+ --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
130
+ }
131
+
132
+ /**
133
+ * Component: Algolia
134
+ * -------------------------------------------------------------------------- */
135
+
136
+ .DocSearch {
137
+ --docsearch-primary-color: var(--vp-c-brand-1) !important;
138
+ }
139
+
@@ -0,0 +1,41 @@
1
+ # 拉取基础镜像
2
+ FROM intranet-harbor.laiyouxi.com/base/alpine/node:20.9.0 as builder
3
+ # 添加部分元数据,暂无意义
4
+ LABEL vendor="Lyx-yunwei" \
5
+ com.example.release-date="2022-11-10" \
6
+ com.example.version.is-production="false"
7
+
8
+ # 维护者
9
+ MAINTAINER BluesYoung "bluesyoung_web@163.com"
10
+ # 配置环境变量
11
+ ENV WORK_DIR=/app
12
+
13
+ # 工作目录
14
+ WORKDIR /app
15
+
16
+ # 没有压缩包,首选 COPY,如果需要自动解包或下载,则使用 ADD
17
+
18
+ # 对比依赖是否变更
19
+ COPY package.json yarn.lock /app/
20
+
21
+ # 设置npm仓库 + 下载依赖,上面的文件如果没有变化则跳过下载,直接使用缓存
22
+ RUN npm config set registry https://registry.npmmirror.com && \
23
+ yarn config set registry https://registry.npmmirror.com && \
24
+ yarn
25
+
26
+ # 加入代码
27
+ COPY . /app
28
+ # 打包
29
+ RUN yarn build
30
+
31
+ # 打包完成,构建最终的极简镜像
32
+ FROM intranet-harbor.laiyouxi.com/base/alpine/node:20.9.0
33
+
34
+ WORKDIR /app
35
+ # 复制源码
36
+ COPY boot.mjs /app/
37
+ COPY config /app/config
38
+ # 复制编译后的代码
39
+ COPY --from=builder /app/.output /app/.output
40
+
41
+ ENTRYPOINT ["node", "boot.mjs"]