create-valaxy 0.7.6 → 0.8.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.
- package/index.js +2 -2
- package/package.json +1 -1
- package/template/package.json +2 -2
- package/template/tsconfig.json +1 -1
- package/template/valaxy.config.ts +8 -11
- package/template/vite.config.ts +1 -9
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
|
-
|
|
47
|
-
|
|
46
|
+
* @type {{ yes: boolean }}
|
|
47
|
+
*/
|
|
48
48
|
const { yes } = await prompts({
|
|
49
49
|
type: 'confirm',
|
|
50
50
|
name: 'yes',
|
package/package.json
CHANGED
package/template/package.json
CHANGED
package/template/tsconfig.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
+
})
|
package/template/vite.config.ts
CHANGED
|
@@ -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: {
|