create-valaxy 0.7.7 → 0.8.1

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/index.js CHANGED
@@ -43,8 +43,8 @@ async function init() {
43
43
  if (existing.length) {
44
44
  console.log(yellow(` Target directory "${targetDir}" is not empty.`))
45
45
  /**
46
- * @type {{ yes: boolean }}
47
- */
46
+ * @type {{ yes: boolean }}
47
+ */
48
48
  const { yes } = await prompts({
49
49
  type: 'confirm',
50
50
  name: 'yes',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-valaxy",
3
- "version": "0.7.7",
3
+ "version": "0.8.1",
4
4
  "description": "Create Starter Template for Valaxy",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
@@ -11,7 +11,7 @@
11
11
  "serve": "vite preview"
12
12
  },
13
13
  "dependencies": {
14
- "valaxy": "0.7.7",
15
- "valaxy-theme-yun": "0.7.7"
14
+ "valaxy": "0.8.1",
15
+ "valaxy-theme-yun": "0.8.1"
16
16
  }
17
17
  }
@@ -14,7 +14,7 @@
14
14
  "strictNullChecks": true,
15
15
  "forceConsistentCasingInFileNames": true,
16
16
  "paths": {
17
- "@/*": ["./*"]
17
+ "~/*": ["./*"]
18
18
  }
19
19
  },
20
20
  "exclude": ["dist", "node_modules"]
@@ -1,11 +1,10 @@
1
- import type { UserConfig } from 'valaxy'
2
- import type { ThemeUserConfig } from 'valaxy-theme-yun'
1
+ import { defineConfig } from 'valaxy'
2
+ import type { ThemeConfig } from 'valaxy-theme-yun'
3
3
 
4
4
  /**
5
5
  * User Config
6
- * do not use export const
7
6
  */
8
- const config: UserConfig<ThemeUserConfig> = {
7
+ export default defineConfig<ThemeConfig>({
9
8
  lang: 'zh-CN',
10
9
  title: 'Valaxy Theme Yun',
11
10
  author: {
@@ -63,7 +62,7 @@ const config: UserConfig<ThemeUserConfig> = {
63
62
  },
64
63
  {
65
64
  name: '微信公众号',
66
- link: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/about/white-qrcode-and-search.jpg',
65
+ link: 'https://cdn.yunyoujun.cn/img/about/white-qrcode-and-search.jpg',
67
66
  icon: 'i-ri-wechat-2-line',
68
67
  color: '#1AAD19',
69
68
  },
@@ -103,19 +102,19 @@ const config: UserConfig<ThemeUserConfig> = {
103
102
  methods: [
104
103
  {
105
104
  name: '支付宝',
106
- url: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/donate/alipay-qrcode.jpg',
105
+ url: 'https://cdn.yunyoujun.cn/img/donate/alipay-qrcode.jpg',
107
106
  color: '#00A3EE',
108
107
  icon: 'i-ri-alipay-line',
109
108
  },
110
109
  {
111
110
  name: 'QQ 支付',
112
- url: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/donate/qqpay-qrcode.png',
111
+ url: 'https://cdn.yunyoujun.cn/img/donate/qqpay-qrcode.png',
113
112
  color: '#12B7F5',
114
113
  icon: 'i-ri-qq-line',
115
114
  },
116
115
  {
117
116
  name: '微信支付',
118
- url: 'https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/donate/wechatpay-qrcode.jpg',
117
+ url: 'https://cdn.yunyoujun.cn/img/donate/wechatpay-qrcode.jpg',
119
118
  color: '#2DC100',
120
119
  icon: 'i-ri-wechat-pay-line',
121
120
  },
@@ -153,6 +152,4 @@ const config: UserConfig<ThemeUserConfig> = {
153
152
  },
154
153
  },
155
154
  },
156
- }
157
-
158
- export default config
155
+ })
@@ -1,18 +1,10 @@
1
1
  import { defineConfig } from 'vite'
2
- import config from './valaxy.config'
3
2
 
3
+ // add icons what you will need
4
4
  const safelist = [
5
5
  'i-ri-home-line',
6
6
  ]
7
7
 
8
- /**
9
- * add your icon to safelist
10
- * if your theme is not yun, so you can add it by yourself
11
- */
12
- config.themeConfig?.pages?.forEach((item) => {
13
- item?.icon && safelist?.push(item?.icon)
14
- })
15
-
16
8
  export default defineConfig({
17
9
  valaxy: {
18
10
  unocss: {