2.0.41 • Published 7 years ago

fontello-mount v2.0.41

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

fontello-mount

js-standard-style Greenkeeper badge

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

2.0.41

7 years ago

2.0.40

7 years ago

2.0.39

7 years ago

2.0.38

7 years ago

2.0.37

7 years ago

2.0.36

7 years ago

2.0.35

7 years ago

2.0.34

7 years ago

2.0.33

7 years ago

2.0.32

7 years ago

2.0.31

7 years ago

2.0.30

7 years ago

2.0.29

7 years ago

2.0.28

8 years ago

2.0.27

8 years ago

2.0.26

8 years ago

2.0.25

8 years ago

2.0.24

8 years ago

2.0.23

8 years ago

2.0.22

8 years ago

2.0.21

8 years ago

2.0.20

8 years ago

2.0.19

8 years ago

2.0.18

8 years ago

2.0.16

8 years ago

2.0.15

8 years ago

2.0.14

8 years ago

2.0.13

8 years ago

2.0.12

8 years ago

2.0.11

8 years ago

2.0.10

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago