/**
 * Load a handlebars template.
 * @see {@link http://handlebarsjs.com/ | handlebars}
 * @function lib.file.loadHbsTmpl
 * @param {string} filename - File path of a handlebar template.
 * @param {function(err, tmpl)} callback - Callback whit loaded compiled template.
 *
 */
var fs = require('fs');
module.exports = function (filename, callback) {
    var Handlebars = require('handlebars');
    fs.readFile(filename, function (err, buffer) {
        if (err) {
            callback(err);
        } else {
            var compiled = Handlebars.compile(buffer.toString());
            callback(null, compiled);
        }
    });
};