Skip to content

Instantly share code, notes, and snippets.

@tylersticka
Created July 21, 2012 00:07
Show Gist options
  • Save tylersticka/3153954 to your computer and use it in GitHub Desktop.
Save tylersticka/3153954 to your computer and use it in GitHub Desktop.
function partial(names) {
var hbs = require('hbs')
, fs = require('fs');
if (typeof names == 'string') names = [names];
names.forEach(function(name){
hbs.registerPartial(name, fs.readFileSync(__dirname + '/../views/partials/' + name + '.hbs', 'utf-8'));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment