fontello-mount
v2.0.41
Published
mount fontello assets without files
Downloads
30
Maintainers
Keywords
Readme
fontello-mount
mount fontello assets in a http route without files
example
var http = require('http')
var mount = require('fontello-mount')
var config = require('./fontello-config')
mount(config, start)
function start (err, fontello) {
var server = http.createServer()
server.on('request', function (q, r)
log(q, r)
if (index(q, r)) return
if (fontello(q, r)) return
notFound(q, r)
})
server.listen(1600, console.log.bind(console, 'running http://localhost:1600'))
}
methods
mount(config, [opt], cb)
config
json or string (fontello config.json contents)
opt
optional options cachePath
or cache
for custom cache
if opt.cachePath
is specified cache to disk will be attempted using a
hash of the fontello config as key
cb
function(err, router, assets)
assets
contains files and types from fontello assets
install
With npm do:
npm install fontello-mount
license
MIT