2017-03-19 16:14:28 +00:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
const plugins = require("./smarthbs.plugins");
|
2017-05-10 14:55:25 +00:00
|
|
|
plugins.handlebars.registerHelper('__analyze', (analyzeContext) => {
|
|
|
|
if (typeof analyzeContext === 'string') {
|
|
|
|
if (plugins.handlebars.partials[analyzeContext]) {
|
|
|
|
plugins.beautylog.log(`The analyzed partial ${analyzeContext} looks like this`);
|
|
|
|
console.log(plugins.handlebars.partials);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
plugins.beautylog.error(`The Partial ${analyzeContext} cannot be found`);
|
|
|
|
}
|
|
|
|
return 'analyzed';
|
|
|
|
}
|
|
|
|
});
|
|
|
|
plugins.handlebars.registerHelper('__allPartialsLog', (analyzeContext) => {
|
|
|
|
console.log(plugins.handlebars.partials);
|
|
|
|
return 'analyzed';
|
|
|
|
});
|
2017-03-25 19:23:47 +00:00
|
|
|
plugins.handlebars.registerHelper('__compile', (evaluationString, evaluationContext) => {
|
|
|
|
let template = plugins.handlebars.compile(evaluationString);
|
|
|
|
return template(evaluationContext);
|
|
|
|
});
|
2017-05-10 14:55:25 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRoYnMuaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0aGJzLmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSw4Q0FBNkM7QUFFN0MsT0FBTyxDQUFDLFVBQVUsQ0FBQyxjQUFjLENBQUMsV0FBVyxFQUFFLENBQUMsY0FBYztJQUM1RCxFQUFFLENBQUMsQ0FBQyxPQUFPLGNBQWMsS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDO1FBQ3ZDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMs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