Skip to content

Commit

Permalink
feat: support unplugin-icon-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
CharleeWa committed May 28, 2024
1 parent 69f1139 commit d3bc84a
Show file tree
Hide file tree
Showing 14 changed files with 283 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ stats.html

# Misc
.DS_Store

# Varlet Iconx
virtual.icons.css
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ An mobile web apps template based on the Vue 3 ecosystem.
- [Varlet](https://github.com/varletjs/varlet) - Material design mobile component library developed based on Vue3
- [`@varlet/touch-emulator`](https://github.com/varletjs/varlet/tree/dev/packages/varlet-touch-emulator) - Simulate mobile touch events on the desktop
- [`@varlet/preset-unocss`](https://github.com/varletjs/varlet/tree/dev/packages/varlet-preset-unocss) - CSS atomic framework presets
- [`@varlet/unplugin-icon-builder`](https://github.com/varletjs/varlet-iconx) - A collection of tools that provide icon solutions for varlet

### Plugins

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

### 插件

Expand Down
4 changes: 4 additions & 0 deletions build/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Sitemap from 'vite-plugin-sitemap'
import VueDevTools from 'vite-plugin-vue-devtools'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import { VarletImportResolver } from '@varlet/import-resolver'
import icon from '@varlet/unplugin-icon-builder/vite'
import { createViteVConsole } from './vconsole'

export function createVitePlugins() {
Expand Down Expand Up @@ -77,6 +78,9 @@ export function createVitePlugins() {
targets: ['defaults', 'not IE 11'],
}),

// https://varlet.pages.dev/#/zh-CN/icon
icon({ dir: 'src/assets/icons', onDemand: true }),

// https://github.com/antfu/unocss
// see uno.config.ts for config
UnoCSS(),
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue3-varlet-mobile",
"type": "module",
"version": "1.0.0",
"packageManager": "pnpm@9.1.2",
"packageManager": "pnpm@9.1.3",
"description": "Vue + Vite H5 Starter Template",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -46,6 +46,7 @@
"@unocss/preset-rem-to-px": "0.60.3",
"@varlet/import-resolver": "^3.2.10",
"@varlet/preset-unocss": "^3.2.10",
"@varlet/unplugin-icon-builder": "^0.2.27",
"@vitejs/plugin-legacy": "^5.4.0",
"@vitejs/plugin-vue": "^5.0.4",
"autoprefixer": "^10.4.19",
Expand Down
Loading

0 comments on commit d3bc84a

Please sign in to comment.