How to use the JavaScriptCompiler function from handlebars

Find comprehensive JavaScript handlebars.JavaScriptCompiler code examples handpicked from public code repositorys.

9
10
11
12
13
14
15
16
17
var _ = require('lodash');
var handlebars = require('handlebars');
var helpers = null;

// Custom nameLookup
var nameLookup = handlebars.JavaScriptCompiler.prototype.nameLookup;
handlebars.JavaScriptCompiler.prototype.nameLookup = function (parent, name, type) {
  return name.indexOf("root") === 0 ? 'data' : nameLookup(parent, name, type);
};
fork icon21
star icon0
watch icon1

+ 3 other calls in file

61
62
63
64
65
66
67
68
69
70
71
72
RawHandlebars.Compiler.prototype.compiler = RawHandlebars.Compiler;


RawHandlebars.JavaScriptCompiler = function () {};


RawHandlebars.JavaScriptCompiler.prototype = Object.create(
  Handlebars.JavaScriptCompiler.prototype
);
RawHandlebars.JavaScriptCompiler.prototype.compiler =
  RawHandlebars.JavaScriptCompiler;
RawHandlebars.JavaScriptCompiler.prototype.namespace = "RawHandlebars";
fork icon0
star icon0
watch icon0