Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (11 sloc) 0.378 kB
fs = require 'fs-extra'
path = require 'path'
module.exports = (Handlebars, src) ->
Handlebars.registerHelper 'readFile', (filename) ->
dir = path.dirname src
filepath = path.join dir, filename
fs.readFileSync filepath, encoding: 'utf8', (err, data) ->
throw err if err?
data
Handlebars.registerHelper 'stringify', (obj) ->
JSON.stringify obj
Jump to Line
Something went wrong with that request. Please try again.