Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/algesthesiah/vite-fontmin
A vite plugin to minify font. based on [Fontmin](https://github.com/ecomfe/fontmin).
https://github.com/algesthesiah/vite-fontmin
Last synced: about 1 month ago
JSON representation
A vite plugin to minify font. based on [Fontmin](https://github.com/ecomfe/fontmin).
- Host: GitHub
- URL: https://github.com/algesthesiah/vite-fontmin
- Owner: algesthesiah
- Created: 2022-09-01T11:47:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-01T13:25:44.000Z (over 2 years ago)
- Last Synced: 2024-10-12T22:27:08.971Z (3 months ago)
- Language: TypeScript
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vite-fontmin
A rollup plugin to minify font. based on [Fontmin](https://github.com/ecomfe/fontmin).
## QUICK START
### install
> npm install -D vite-fontmin
### usage
#### vite
```typescript
{
plugins:[
ViteFontmin({
fontSrc: './src/assets/font/*.*',
fontDest: './public/font',
fileExt: ['ts'],
include: 'src/locales/**/*',
}),
]
}
```## API
| key | type | description | default |
| -------- | ------------------ | ------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| fontSrc | string | needs minify fonts file src | './public/font/\*.*' |
| fontDest | string | minified fonts output file src | './dist/font' |
| include | string[] or string | scan folders or files based on [fast-glob](https://github.com/mrmlnc/fast-glob) | 'src/**/*' |
| fileExt | string[] or string | scan files extension list | 'ts', 'js', 'tsx', 'jsx', 'vue', 'scss', 'sass', 'html', 'json' |
| exclude | string[] or string | exclude folders or files | '' |