Skip to content

Instantly share code, notes, and snippets.

@mikeal mikeal/gist:5225307
Last active Dec 15, 2015

Embed
What would you like to do?
var handlebars = require('handlebars')
, path = require('path')
, fs = require('fs')
;
exports.templates = {}
exports.files = ['test.hbs']
exports.files.forEach(function (f) {
exports.templates[f] = fs.readFileSync(path.join(__dirname, '..', 'templates', f)).toString()
exports[f] = handlebars.compile(exports.templates[f].toString())
})
@mikeal

This comment has been minimized.

Copy link
Owner Author

commented Mar 22, 2013

ReferenceError: path is not defined
    at eval (eval at <anonymous> (/Users/mikeal/Documents/git/constructable/node_modules/brfs/index.js:36:29), <anonymous>:2:8)
    at /Users/mikeal/Documents/git/constructable/node_modules/brfs/index.js:36:46
    at walk (/Users/mikeal/Documents/git/constructable/node_modules/brfs/node_modules/falafel/index.js:60:9)
    at /Users/mikeal/Documents/git/constructable/node_modules/brfs/node_modules/falafel/index.js:57:17
    at Array.forEach (native)
    at forEach (/Users/mikeal/Documents/git/constructable/node_modules/brfs/node_modules/falafel/index.js:8:31)
    at walk (/Users/mikeal/Documents/git/constructable/node_modules/brfs/node_modules/falafel/index.js:44:9)
    at /Users/mikeal/Documents/git/constructable/node_modules/brfs/node_modules/falafel/index.js:57:17
    at Array.forEach (native)
    at forEach (/Users/mikeal/Documents/git/constructable/node_modules/brfs/node_modules/falafel/index.js:8:31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.