-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuno.config.ts
55 lines (53 loc) · 1.2 KB
/
uno.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import axios from 'axios'
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import config from './src/config'
import tools from './src/tools'
const iconClass = tools.map(item => item.icon).filter(item => item)
export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetIcons({
mode: 'auto',
extraProperties: {
display: 'inline-block',
},
}),
presetWebFonts({
provider: 'google',
customFetch(url) {
url = url.replace('fonts.googleapis.com', `${config.cdnHost}/fonts`)
return axios.get(url).then(res => res.data)
},
fonts: {
mono: 'JetBrains Mono:300,400,700',
inter: 'Inter:500,700',
},
timeouts: {
warning: 5000,
failure: 10000,
},
}),
presetTypography(),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
safelist: [
'i-icon-park-solid-all-application',
'i-icon-park-outline-history',
'i-icon-park-solid-concern',
'i-icon-park-solid-folder-focus',
...iconClass,
],
})