Skip to content

Commit d3bc84a

Browse files
committed
feat: support unplugin-icon-builder
1 parent 69f1139 commit d3bc84a

14 files changed

+283
-7
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ stats.html
2323

2424
# Misc
2525
.DS_Store
26+
27+
# Varlet Iconx
28+
virtual.icons.css

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ An mobile web apps template based on the Vue 3 ecosystem.
8080
- [Varlet](https://github.com/varletjs/varlet) - Material design mobile component library developed based on Vue3
8181
- [`@varlet/touch-emulator`](https://github.com/varletjs/varlet/tree/dev/packages/varlet-touch-emulator) - Simulate mobile touch events on the desktop
8282
- [`@varlet/preset-unocss`](https://github.com/varletjs/varlet/tree/dev/packages/varlet-preset-unocss) - CSS atomic framework presets
83+
- [`@varlet/unplugin-icon-builder`](https://github.com/varletjs/varlet-iconx) - A collection of tools that provide icon solutions for varlet
8384

8485
### Plugins
8586

README.zh-CN.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ An mobile web apps template based on the Vue 3 ecosystem.
8080
- [Varlet](https://github.com/varletjs/varlet) - 基于 Vue3 开发的 Material 风格移动端组件库
8181
- [`@varlet/touch-emulator`](https://github.com/varletjs/varlet/tree/dev/packages/varlet-touch-emulator) - 在桌面端上模拟移动端 touch 事件
8282
- [`@varlet/preset-unocss`](https://github.com/varletjs/varlet/tree/dev/packages/varlet-preset-unocss) - 原子化 CSS 支持
83+
- [`@varlet/unplugin-icon-builder`](https://github.com/varletjs/varlet-iconx) - 为 Varlet 提供图标解决方案的工具集合
8384

8485
### 插件
8586

build/vite/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import Sitemap from 'vite-plugin-sitemap'
1414
import VueDevTools from 'vite-plugin-vue-devtools'
1515
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
1616
import { VarletImportResolver } from '@varlet/import-resolver'
17+
import icon from '@varlet/unplugin-icon-builder/vite'
1718
import { createViteVConsole } from './vconsole'
1819

1920
export function createVitePlugins() {
@@ -77,6 +78,9 @@ export function createVitePlugins() {
7778
targets: ['defaults', 'not IE 11'],
7879
}),
7980

81+
// https://varlet.pages.dev/#/zh-CN/icon
82+
icon({ dir: 'src/assets/icons', onDemand: true }),
83+
8084
// https://github.com/antfu/unocss
8185
// see uno.config.ts for config
8286
UnoCSS(),

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue3-varlet-mobile",
33
"type": "module",
44
"version": "1.0.0",
5-
"packageManager": "[email protected].2",
5+
"packageManager": "[email protected].3",
66
"description": "Vue + Vite H5 Starter Template",
77
"license": "MIT",
88
"scripts": {
@@ -46,6 +46,7 @@
4646
"@unocss/preset-rem-to-px": "0.60.3",
4747
"@varlet/import-resolver": "^3.2.10",
4848
"@varlet/preset-unocss": "^3.2.10",
49+
"@varlet/unplugin-icon-builder": "^0.2.27",
4950
"@vitejs/plugin-legacy": "^5.4.0",
5051
"@vitejs/plugin-vue": "^5.0.4",
5152
"autoprefixer": "^10.4.19",

0 commit comments

Comments
 (0)