Renamed "helpers" arg " __helpers"

This commit is contained in:
Patrick Steele-Idem 2014-04-10 11:41:20 -06:00
parent 1bc823dfd6
commit b48c2ff030
7 changed files with 25 additions and 25 deletions

View File

@ -190,7 +190,7 @@ Node.prototype = {
if (escapeXml !== false) {
methodCall = 'context.captureString(';
} else {
methodCall = 'helpers.c(context, ';
methodCall = '__helpers.c(context, ';
}
return template.makeExpression({

View File

@ -79,7 +79,7 @@ CodeWriter.prototype = {
args = arrayFromArguments(arguments, 1);
this.flush();
this._code.append(this._indent + 'helpers.' + methodName + '(context');
this._code.append(this._indent + '__helpers.' + methodName + '(context');
if (args.length) {
this._code.append(', ');
@ -268,7 +268,7 @@ TemplateBuilder.prototype = {
if (added) {
return added;
} else {
this.addStaticVar(varName, 'helpers.' + propName);
this.addStaticVar(varName, '__helpers.' + propName);
this.helperFunctionsAdded[propName] = varName;
return varName;
}
@ -413,7 +413,7 @@ TemplateBuilder.prototype = {
} else {
params = ['context'];
}
out.append('module.exports = function create(helpers) {\n');
out.append('module.exports = function create(__helpers) {\n');
//Write out the static variables
this.writer.flush();
this._writeVars(this.staticVars, out, INDENT);

View File

@ -54,7 +54,7 @@ DefNode.prototype = {
}
template.statement('function ' + func + ' {').indent(function () {
template.line('return helpers.c(context, function() {').indent(function () {
template.line('return __helpers.c(context, function() {').indent(function () {
this.generateCodeForChildren(template);
}, this).line('});');
}, this).line('}');

View File

@ -1,10 +1,10 @@
module.exports = function create(helpers) {
var empty = helpers.e,
notEmpty = helpers.ne,
module.exports = function create(__helpers) {
var empty = __helpers.e,
notEmpty = __helpers.ne,
hello_renderer = require("./hello-renderer");
return function render(data, context) {
helpers.t(context,
__helpers.t(context,
hello_renderer,
{
"name": "World"

View File

@ -1,9 +1,9 @@
module.exports = function create(helpers) {
var empty = helpers.e,
notEmpty = helpers.ne,
escapeXmlAttr = helpers.xa,
escapeXml = helpers.x,
forEach = helpers.f;
module.exports = function create(__helpers) {
var empty = __helpers.e,
notEmpty = __helpers.ne,
escapeXmlAttr = __helpers.xa,
escapeXml = __helpers.x,
forEach = __helpers.f;
return function render(data, context) {
var rootClass=data.rootClass;

View File

@ -1,17 +1,17 @@
module.exports = function create(helpers) {
var empty = helpers.e,
notEmpty = helpers.ne,
module.exports = function create(__helpers) {
var empty = __helpers.e,
notEmpty = __helpers.ne,
hello_renderer = require("../hello-renderer"),
escapeXmlAttr = helpers.xa,
escapeXml = helpers.x,
forEach = helpers.f;
escapeXmlAttr = __helpers.xa,
escapeXml = __helpers.x,
forEach = __helpers.f;
return function render(data, context) {
var rootClass = data.rootClass,
colors = data.colors,
message = data.message;
helpers.t(context,
__helpers.t(context,
hello_renderer,
{
"name": "World"

View File

@ -1,6 +1,6 @@
module.exports = function create(helpers) {
var empty = helpers.e,
notEmpty = helpers.ne;
module.exports = function create(__helpers) {
var empty = __helpers.e,
notEmpty = __helpers.ne;
return function render(data, context) {
context.w('Hello John');