chore: add PurgeIcons

This commit is contained in:
Anthony Fu 2020-08-10 19:24:52 +08:00
parent 5d5a3b35b5
commit 858161226e
6 changed files with 157 additions and 31 deletions

View File

@ -22,9 +22,13 @@
- [Tailwind CSS](https://tailwindcss.com/)
- [tailwindcss-dark-mode](https://github.com/ChanceArthur/tailwindcss-dark-mode)
- [Iconify](https://iconify.design) - use icons from your favorite sets. [🔍Icônes](https://icones.netlify.app/)
<!-- - [variantwind](https://github.com/sibbngheid/variantwind) -->
### Icons
- [Iconify](https://iconify.design) - use icons from any icon sets [🔍Icônes](https://icones.netlify.app/)
- [PurgeIcons](https://github.com/antfu/purge-icons) - bundles only the icons that you use
### Router
- [Vue Router](https://github.com/vuejs/vue-router)
@ -33,7 +37,7 @@
### Utils
- [vue-i18n](https://github.com/intlify/vue-i18n-next)
- [VueUse](https://github.com/antfu/vueuse)
- [VueUse](https://github.com/antfu/vueuse) - collection of useful composition APIs
### Misc
@ -42,7 +46,7 @@
### Dev tools
- [Typescript](https://www.typescriptlang.org/)
- [pnpm](https://pnpm.js.org/)
- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
- [Netlify](https://www.netlify.com/)
- [ESLint](https://eslint.org/) with [@antfu/eslint-config-vue](https://github.com/antfu/eslint-config)
- [VS Code Extensions](./.vscode/extensions.json)

View File

@ -5,7 +5,6 @@
<link rel="icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vitesse</title>
<script src="https://cdn.jsdelivr.net/npm/@iconify/iconify@1.0.7/dist/iconify.min.js"></script>
</head>
<body>
<div id="app"></div>

View File

@ -7,7 +7,7 @@
"build": "vite build"
},
"dependencies": {
"@iconify/core": "^1.0.0-beta.3",
"@iconify/iconify": "^1.0.7",
"@vueuse/core": "^4.0.0-beta.4",
"variantwind": "^0.3.4",
"vue": "^3.0.0-rc.5",
@ -16,14 +16,16 @@
},
"devDependencies": {
"@antfu/eslint-config-vue": "^0.2.14",
"@iconify/json": "^1.1.204",
"@typescript-eslint/eslint-plugin": "^3.8.0",
"@vue/compiler-sfc": "^3.0.0-rc.5",
"eslint": "^7.6.0",
"pnpm": "^5.5.0",
"pnpm": "^5.5.1",
"tailwindcss": "^1.6.2",
"tailwindcss-dark-mode": "^1.1.6",
"typescript": "^3.9.7",
"vite": "^1.0.0-rc.4",
"vite-plugin-purge-icons": "^0.0.1",
"vite-plugin-voie": "^0.2.0"
},
"eslintConfig": {

View File

@ -1,5 +1,5 @@
dependencies:
'@iconify/core': 1.0.0-beta.3
'@iconify/iconify': 1.0.7
'@vueuse/core': 4.0.0-beta.4_vue@3.0.0-rc.5
variantwind: 0.3.4
vue: 3.0.0-rc.5
@ -7,14 +7,16 @@ dependencies:
vue-router: 4.0.0-beta.6_vue@3.0.0-rc.5
devDependencies:
'@antfu/eslint-config-vue': 0.2.14_eslint@7.6.0+typescript@3.9.7
'@iconify/json': 1.1.204
'@typescript-eslint/eslint-plugin': 3.8.0_eslint@7.6.0+typescript@3.9.7
'@vue/compiler-sfc': 3.0.0-rc.5_vue@3.0.0-rc.5
eslint: 7.6.0
pnpm: 5.5.0
pnpm: 5.5.1
tailwindcss: 1.6.2
tailwindcss-dark-mode: 1.1.6
typescript: 3.9.7
vite: 1.0.0-rc.4
vite-plugin-purge-icons: 0.0.1
vite-plugin-voie: 0.2.0_6b72416f8828a68c9ce672e874710004
lockfileVersion: 5.1
packages:
@ -143,10 +145,6 @@ packages:
to-fast-properties: 2.0.0
resolution:
integrity: sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==
/@cyberalien/redundancy/1.0.0:
dev: false
resolution:
integrity: sha512-/tx5GpGSyMn5FrOSggDSm9yJDLcEXiK0+zdCBssST6w9QgdJjoQ9lRBSxql/3vgQoI+7XbubWsP86jjbuVnFcA==
/@fullhuman/postcss-purgecss/2.3.0:
dependencies:
postcss: 7.0.32
@ -154,19 +152,14 @@ packages:
dev: true
resolution:
integrity: sha512-qnKm5dIOyPGJ70kPZ5jiz0I9foVOic0j+cOzNDoo8KoCf6HjicIZ99UfO2OmE7vCYSKAAepEwJtNzpiiZAh9xw==
/@iconify/core/1.0.0-beta.3:
dependencies:
'@cyberalien/redundancy': 1.0.0
'@iconify/types': 1.0.3
dev: false
optionalDependencies:
axios: 0.19.2
resolution:
integrity: sha512-VqdW1vu7uWBI4QhOijVbT4vxDUKLjGNOye7SbJxvB2XQpJIQe9ZKnNqIyX1fO1olSV+Zf4Y1CQhWjw/sOxW+sQ==
/@iconify/types/1.0.3:
/@iconify/iconify/1.0.7:
dev: false
resolution:
integrity: sha512-FJvID3jDE1axAiVPUU8+ANeYt8neG1hlSX8g+GFLUaTW6aLMtYx6F2CY1jj9N/unClwdQPtXCE7qORqEBvtVaQ==
integrity: sha512-qCbH1V/Ceg302lrgBiiXCZAyqMAq8KqsHYokCpUvgBH6yYfAmvlSkEEBrmJdHofQvfY/+xaeQcsOOTjW7JakNw==
/@iconify/json/1.1.204:
dev: true
resolution:
integrity: sha512-+ZB8GXv1Yn4QPT9t3k9HKskWpEGgTusBKOeaBy5x+MUaaJvYFtn6IOlyYqhIfQ00PgIfb0w3k+NhN6IEhv92gw==
/@nodelib/fs.scandir/2.1.3:
dependencies:
'@nodelib/fs.stat': 2.0.3
@ -789,8 +782,7 @@ packages:
/axios/0.19.2:
dependencies:
follow-redirects: 1.5.10
dev: false
optional: true
dev: true
resolution:
integrity: sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==
/babel-eslint/10.1.0_eslint@7.6.0:
@ -927,6 +919,12 @@ packages:
node: '>= 6'
resolution:
integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==
/camelcase/5.3.1:
dev: true
engines:
node: '>=6'
resolution:
integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
/caniuse-lite/1.0.30001111:
dev: true
resolution:
@ -1000,6 +998,14 @@ packages:
node: '>=6'
resolution:
integrity: sha512-sJAofoarcm76ZGpuooaO0eDy8saEy+YoZBLjC4h8srt4jeBnkYeOgqxgsJQTpyt2LjI5PTfLJHSL+41Yu4fEJA==
/cliui/6.0.0:
dependencies:
string-width: 4.2.0
strip-ansi: 6.0.0
wrap-ansi: 6.2.0
dev: true
resolution:
integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
/clone/1.0.4:
dev: true
engines:
@ -1152,6 +1158,7 @@ packages:
/debug/3.1.0:
dependencies:
ms: 2.0.0
dev: true
resolution:
integrity: sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
/debug/3.2.6:
@ -1166,6 +1173,12 @@ packages:
dev: true
resolution:
integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
/decamelize/1.2.0:
dev: true
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
/deep-equal/1.0.1:
dev: true
resolution:
@ -1284,6 +1297,10 @@ packages:
dev: true
resolution:
integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
/emoji-regex/8.0.0:
dev: true
resolution:
integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
/emojis-list/3.0.0:
dev: true
engines:
@ -1777,10 +1794,9 @@ packages:
/follow-redirects/1.5.10:
dependencies:
debug: 3.1.0
dev: false
dev: true
engines:
node: '>=4.0'
optional: true
resolution:
integrity: sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==
/fresh/0.5.2:
@ -1837,6 +1853,12 @@ packages:
dev: true
resolution:
integrity: sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==
/get-caller-file/2.0.5:
dev: true
engines:
node: 6.* || 8.* || >= 10.*
resolution:
integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
/get-stream/5.1.0:
dependencies:
pump: 3.0.0
@ -2144,6 +2166,12 @@ packages:
node: '>=4'
resolution:
integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
/is-fullwidth-code-point/3.0.0:
dev: true
engines:
node: '>=8'
resolution:
integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
/is-generator-function/1.0.7:
dev: true
engines:
@ -2551,6 +2579,7 @@ packages:
resolution:
integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
/ms/2.0.0:
dev: true
resolution:
integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
/ms/2.1.2:
@ -2910,13 +2939,13 @@ packages:
node: '>=4'
resolution:
integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==
/pnpm/5.5.0:
/pnpm/5.5.1:
dev: true
engines:
node: '>=10.13'
hasBin: true
resolution:
integrity: sha512-eCI98sJWKrb8w/AClOPPbExWzilNeB9q22eh0shGwd7EeCGiMS2JloXOKWOQzHUrTGsPftivgZpdsM/nQ4L2lQ==
integrity: sha512-KpV6h/pVHTv4LY+DU+dbgPozMwpbvSNA+axj7ZxdgGWQTFpdOA/UQGHRe1zbcqWv7d7SKIURIwccyb8sGVRz1g==
/postcss-discard-comments/4.0.2:
dependencies:
postcss: 7.0.32
@ -3086,6 +3115,17 @@ packages:
node: '>=6'
resolution:
integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
/purge-icons/0.0.2:
dependencies:
axios: 0.19.2
debug: 4.1.1
fast-glob: 3.2.4
fs-extra: 9.0.1
yargs: 15.4.1
dev: true
hasBin: true
resolution:
integrity: sha512-dytZVCS/38pgOWxaqWx+Rh2oKN9e7fpr7YvOWucKo5PL/VfZLaVLLD/EyI6+IAE94FI348KIcoGg/vDpT18IYQ==
/purgecss/2.3.0:
dependencies:
commander: 5.1.0
@ -3168,6 +3208,16 @@ packages:
node: '>=8'
resolution:
integrity: sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==
/require-directory/2.1.1:
dev: true
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
/require-main-filename/2.0.0:
dev: true
resolution:
integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
/requires-port/1.0.0:
dev: true
resolution:
@ -3325,6 +3375,10 @@ packages:
dev: true
resolution:
integrity: sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
/set-blocking/2.0.0:
dev: true
resolution:
integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
/setprototypeof/1.1.0:
dev: true
resolution:
@ -3445,6 +3499,16 @@ packages:
node: '>=6'
resolution:
integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
/string-width/4.2.0:
dependencies:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.0
dev: true
engines:
node: '>=8'
resolution:
integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
/string.prototype.trimend/1.0.1:
dependencies:
define-properties: 1.1.3
@ -3722,6 +3786,12 @@ packages:
node: '>= 0.8'
resolution:
integrity: sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
/vite-plugin-purge-icons/0.0.1:
dependencies:
purge-icons: 0.0.2
dev: true
resolution:
integrity: sha512-vDn7gy1IUXIvq0y7gI4VlS3/FdM84q0GxSRfZktA7I2tLS2HGIJyaWuX/ZCYqgFGRcHD5QrFiEhLOoc3TybhPA==
/vite-plugin-voie/0.2.0_6b72416f8828a68c9ce672e874710004:
dependencies:
glob: 7.1.6
@ -3849,6 +3919,10 @@ packages:
dev: true
resolution:
integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=
/which-module/2.0.0:
dev: true
resolution:
integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
/which/2.0.2:
dependencies:
isexe: 2.0.0
@ -3864,6 +3938,16 @@ packages:
node: '>=0.10.0'
resolution:
integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
/wrap-ansi/6.2.0:
dependencies:
ansi-styles: 4.2.1
string-width: 4.2.0
strip-ansi: 6.0.0
dev: true
engines:
node: '>=8'
resolution:
integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
/wrappy/1.0.2:
dev: true
resolution:
@ -3896,10 +3980,41 @@ packages:
node: '>=0.4'
resolution:
integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==
/y18n/4.0.0:
dev: true
resolution:
integrity: sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
/yallist/3.1.1:
dev: true
resolution:
integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
/yargs-parser/18.1.3:
dependencies:
camelcase: 5.3.1
decamelize: 1.2.0
dev: true
engines:
node: '>=6'
resolution:
integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
/yargs/15.4.1:
dependencies:
cliui: 6.0.0
decamelize: 1.2.0
find-up: 4.1.0
get-caller-file: 2.0.5
require-directory: 2.1.1
require-main-filename: 2.0.0
set-blocking: 2.0.0
string-width: 4.2.0
which-module: 2.0.0
y18n: 4.0.0
yargs-parser: 18.1.3
dev: true
engines:
node: '>=8'
resolution:
integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
/ylru/1.2.1:
dev: true
engines:
@ -3908,17 +4023,19 @@ packages:
integrity: sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==
specifiers:
'@antfu/eslint-config-vue': ^0.2.14
'@iconify/core': ^1.0.0-beta.3
'@iconify/iconify': ^1.0.7
'@iconify/json': ^1.1.204
'@typescript-eslint/eslint-plugin': ^3.8.0
'@vue/compiler-sfc': ^3.0.0-rc.5
'@vueuse/core': ^4.0.0-beta.4
eslint: ^7.6.0
pnpm: ^5.5.0
pnpm: ^5.5.1
tailwindcss: ^1.6.2
tailwindcss-dark-mode: ^1.1.6
typescript: ^3.9.7
variantwind: ^0.3.4
vite: ^1.0.0-rc.4
vite-plugin-purge-icons: ^0.0.1
vite-plugin-voie: ^0.2.0
vue: ^3.0.0-rc.5
vue-i18n: ^9.0.0-alpha.13

View File

@ -5,6 +5,8 @@ import { createI18n } from 'vue-i18n'
// @ts-ignore: this is generated from voie, which TypeScript is not able to infer types correctly
import routes from '/@voie/pages'
import '/@purge-icons/icons'
import { registerComponents } from './components'
import App from './App.vue'
import { messages } from './messages'

View File

@ -1,4 +1,5 @@
import voie from 'vite-plugin-voie'
import PurgeIcons from 'vite-plugin-purge-icons'
export default {
plugins: [
@ -6,5 +7,6 @@ export default {
pagesDir: 'src/pages',
extensions: ['vue', 'ts'],
}),
PurgeIcons(),
],
}