serve-fontmin
fontmin serving middleware
Usage
server
var express = ;var fontmin = ;var app = ; app; var server = app;
browser
basic
${pathname}/${filename}.css?text=${text}
optional font-family
${pathname}/${filename}.css?text=${text}&name=${fontFamily}
API
fontmin(path, [options])
Path:
source font path.
Options:
headers
headers of response to serve, optional.oppressor
compression response, defaults false.base64
inject base64 data:application/x-font-ttf; (gzip font with css). defaults falsestorage
storage plugin, if you want to use a Storage Service likeAWS
,BOS
insteadfs
, optional.
Example
$ cd example$ npm i$ node app.js
open http://127.0.0.1:8090/index.html
Related
License
MIT © fontmin