Skip to content

Instantly share code, notes, and snippets.

@mikeal
Last active December 15, 2015 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeal/5225307 to your computer and use it in GitHub Desktop.
Save mikeal/5225307 to your computer and use it in GitHub Desktop.
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
Copy link
Author

mikeal 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