]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/node_modules/promzard/example/buffer.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / init-package-json / node_modules / promzard / example / buffer.js
1 var pz = require('../promzard')
2
3 var path = require('path')
4 var file = path.resolve(__dirname, 'substack-input.js')
5 var buf = require('fs').readFileSync(file)
6 var ctx = { basename: path.basename(path.dirname(file)) }
7
8 pz.fromBuffer(buf, ctx, function (er, res) {
9   if (er)
10     throw er
11   console.error(JSON.stringify(res, null, 2))
12 })