- Notifications
You must be signed in to change notification settings - Fork3
webpack fontmin loader, used for font files cutting
License
NotificationsYou must be signed in to change notification settings
Jack-Sparrow/awesome-fontmin-loader
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fontmin loader for webpack,use to cut font files from texts.
Suport:ttf
,eot
,woff
,woff2
,svg
You can usecharactor-scanner if you want to pick charactors from your code files.
const Scan = require('charactor-scanner');let text = Scan({ dir: path.resolve(__dirname, './code-directory'), sync: true}).join('')
npm install --save-dev awesome-fontmin-loader
Webpack 2.x config:
{ test: /\.(svg|woff|woff2|ttf|eot)$/, use: [ { loader: 'awesome-fontmin-loader', options: { limit: 1000, name: 'assets/fonts/[name].[hash].[ext]', text: 'FOOBAR' } } ]}
Webpack 1.x config:
{ test: /\.(svg|woff|woff2|ttf|eot)$/, loader: "awesome-fontmin?limit=1000&name=fonts/[name].[ext]&text='FOOBAR'" },
Fonts must have the same name and path as the TrueType version of the font.
if you perfer a webpack plugin to a loader, you can see:fontmin-webpack plugin
About
webpack fontmin loader, used for font files cutting
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.