lib/index.js
function template(filePath, locals, fn) {
    filePath = path.join(getConfig('template.folder'), filePath  + '.' + getConfig('template.extension')); // i.e. index -> index.ejs
    return cons[getConfig('template.engine')].call(null, filePath, locals, fn);                            // i.e. cons.swig('views/page.html', { user: 'tobi' }, function(err, html){}
}
function template(filePath, locals, fn) {
    filePath = path.join(getConfig('template.folder'), filePath  + '.' + getConfig('template.extension')); // i.e. index -> index.ejs
    return cons[getConfig('template.engine')].call(null, filePath, locals, fn);                            // i.e. cons.swig('views/page.html', { user: 'tobi' }, function(err, html){}
}
function template ( filePath , locals , fn ) { filePath = path . join ( getConfig ( 'template.folder' ) , filePath + '.' + getConfig ( 'template.extension' ) ) ; // i.e. index -> index.ejs return cons [ getConfig ( 'template.engine' ) ] . call ( null , filePath , locals , fn ) ; // i.e. cons.swig('views/page.html', { user: 'tobi' }, function(err, html){} }
Renders the template and executes callback function.
@private
@param {string} filePath - Path of the template file relative to template folder.
@param {object} locals - Local variables to pass to template
@param {function} fn - Callback function(err, output)
Renders the template and executes callback function .