src/index.js
function registerTemplate(filepath, callback) {
    fs.readFile(filepath, 'utf8', function (err, data) {
      if (err) callback(err);
      callback(null, {
        name: path.parse(filepath).name,
        template: hbs.compile(data)
      });
    });
  }
function registerTemplate(filepath, callback) {
    fs.readFile(filepath, 'utf8', function (err, data) {
      if (err) callback(err);
      callback(null, {
        name: path.parse(filepath).name,
        template: hbs.compile(data)
      });
    });
  }
function registerTemplate ( filepath , callback ) { fs . readFile ( filepath , 'utf8' , function ( err , data ) { if ( err ) callback ( err ) ; callback ( null , { name : path . parse ( filepath ) . name , template : hbs . compile ( data ) } ) ; } ) ; }
Read file into buffer and register as hbs template
@param {String} filepath
@param {Function.<Error, Object>} callback
Read file into buffer and register as hbs template