mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-04-19 14:20:25 +01:00
Helpers shouldn't be specific to a given template engine (eg, Handlebars) in order to allow sharing of helpers between different template engines. Isolate abstract helpers in another module and apply them via Handlebars.registerHelper and as necessary for other template engines.
26 lines
471 B
JavaScript
26 lines
471 B
JavaScript
/**
|
|
Template helper definitions for Handlebars.
|
|
@license MIT. Copyright (c) 2015 James Devlin / FluentDesk.
|
|
@module handlebars-helpers.js
|
|
*/
|
|
|
|
|
|
(function() {
|
|
|
|
var HANDLEBARS = require('handlebars')
|
|
, _ = require('underscore')
|
|
, helpers = require('./generic-helpers');
|
|
|
|
/**
|
|
Register useful Handlebars helpers.
|
|
@method registerHelpers
|
|
*/
|
|
module.exports = function( theme ) {
|
|
|
|
helpers.theme = theme;
|
|
HANDLEBARS.registerHelper( helpers );
|
|
|
|
};
|
|
|
|
}());
|