mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Renamed "helpers" arg " __helpers"
This commit is contained in:
parent
1bc823dfd6
commit
b48c2ff030
@ -190,7 +190,7 @@ Node.prototype = {
|
||||
if (escapeXml !== false) {
|
||||
methodCall = 'context.captureString(';
|
||||
} else {
|
||||
methodCall = 'helpers.c(context, ';
|
||||
methodCall = '__helpers.c(context, ';
|
||||
}
|
||||
|
||||
return template.makeExpression({
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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('}');
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user