Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 378 Bytes
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.