Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

'function(' replaced with 'function (' everywhere

  • Loading branch information...
commit f2dbdb4b3d8d3d19079d6aa101ec5f6e06c8628a 1 parent cbd1d33
@dimsmol authored
Showing with 515 additions and 520 deletions.
  1. +4 −4 README.md
  2. +1 −1  bin/ojster
  3. +17 −17 client/goog/ojster.js
  4. +17 −17 client/universal/ojster.js
  5. +2 −2 examples/client/compiled/amd/base.js
  6. +2 −2 examples/client/compiled/browserglobals/base.js
  7. +2 −2 examples/client/compiled/universal/base.js
  8. +2 −2 examples/goog/templates/base.js
  9. +3 −3 examples/goog_scope/templates/base.js
  10. +2 −2 examples/node/templates/base.js
  11. +1 −1  examples/somemodule.js
  12. +9 −10 examples/universal/compiled/client/amd/base.js
  13. +2 −2 examples/universal/compiled/client/amd/hobbies.js
  14. +16 −16 examples/universal/compiled/client/amd/person.js
  15. +4 −4 examples/universal/compiled/client/amd/tools.js
  16. +9 −10 examples/universal/compiled/client/browserglobals/base.js
  17. +2 −2 examples/universal/compiled/client/browserglobals/hobbies.js
  18. +16 −16 examples/universal/compiled/client/browserglobals/person.js
  19. +4 −4 examples/universal/compiled/client/browserglobals/tools.js
  20. +9 −10 examples/universal/compiled/client/universal/base.js
  21. +2 −2 examples/universal/compiled/client/universal/hobbies.js
  22. +16 −16 examples/universal/compiled/client/universal/person.js
  23. +4 −4 examples/universal/compiled/client/universal/tools.js
  24. +10 −11 examples/universal/compiled/goog_scope/base.js
  25. +3 −3 examples/universal/compiled/goog_scope/hobbies.js
  26. +17 −17 examples/universal/compiled/goog_scope/person.js
  27. +5 −5 examples/universal/compiled/goog_scope/tools.js
  28. +9 −10 examples/universal/compiled/node/base.js
  29. +2 −2 examples/universal/compiled/node/hobbies.js
  30. +16 −16 examples/universal/compiled/node/person.js
  31. +4 −4 examples/universal/compiled/node/tools.js
  32. +5 −5 lib/compiler/compile.js
  33. +3 −3 lib/compiler/errors.js
  34. +13 −13 lib/compiler/generators/client/generator.js
  35. +21 −21 lib/compiler/generators/core/block.js
  36. +25 −25 lib/compiler/generators/core/errors.js
  37. +16 −16 lib/compiler/generators/core/function.js
  38. +35 −35 lib/compiler/generators/core/generator.js
  39. +16 −16 lib/compiler/generators/core/sequence.js
  40. +36 −36 lib/compiler/generators/core/template.js
  41. +13 −13 lib/compiler/generators/goog/generator.js
  42. +9 −9 lib/compiler/generators/goog/template.js
  43. +5 −5 lib/compiler/generators/node/generator.js
  44. +1 −1  lib/compiler/tokenizer/command_parsers/base.js
  45. +1 −1  lib/compiler/tokenizer/command_parsers/call.js
  46. +4 −4 lib/compiler/tokenizer/command_parsers/core.js
  47. +1 −1  lib/compiler/tokenizer/command_parsers/css.js
  48. +3 −3 lib/compiler/tokenizer/command_parsers/func.js
  49. +1 −1  lib/compiler/tokenizer/command_parsers/inherits.js
  50. +1 −1  lib/compiler/tokenizer/command_parsers/init.js
  51. +2 −2 lib/compiler/tokenizer/command_parsers/insert.js
  52. +1 −1  lib/compiler/tokenizer/command_parsers/space.js
  53. +1 −1  lib/compiler/tokenizer/command_parsers/template.js
  54. +8 −8 lib/compiler/tokenizer/errors.js
  55. +13 −13 lib/compiler/tokenizer/index.js
  56. +2 −2 lib/compiler/tokenizer/tokens/base.js
  57. +6 −6 lib/compiler/tokenizer/tokens/block.js
  58. +2 −2 lib/compiler/tokenizer/tokens/code.js
  59. +2 −2 lib/compiler/tokenizer/tokens/core.js
  60. +2 −2 lib/compiler/tokenizer/tokens/expression.js
  61. +3 −3 lib/compiler/tokenizer/tokens/fragment.js
  62. +4 −4 lib/compiler/tokenizer/tokens/function.js
  63. +2 −2 lib/compiler/tokenizer/tokens/inherits.js
  64. +2 −2 lib/compiler/tokenizer/tokens/require.js
  65. +2 −2 lib/compiler/tokenizer/tokens/specials.js
  66. +2 −2 lib/compiler/tokenizer/tokens/symbols.js
  67. +4 −4 lib/compiler/tokenizer/tokens/template.js
  68. +1 −1  lib/extension.js
  69. +4 −4 lib/fs/file_compiler.js
  70. +13 −13 lib/fs/path_compiler.js
  71. +1 −1  lib/rendering/escape.js
  72. +1 −1  lib/rendering/send.js
  73. +3 −3 lib/rendering/string_writer.js
  74. +10 −10 lib/template.js
  75. +3 −3 lib/tools/fs.js
View
8 README.md
@@ -77,12 +77,12 @@ Blocks can be nested. If block is nested corresponding method call will be place
will be translated into something like
- TemplateClass.prototype.appendBlockA = function() {
+ TemplateClass.prototype.appendBlockA = function () {
this.append('a');
this.appendBlockB();
};
- TemplateClass.prototype.appendBlockB = function() {
+ TemplateClass.prototype.appendBlockB = function () {
this.append('b');
};
@@ -98,13 +98,13 @@ Note, that nested blocks haven't access to local variables of nesting block, bec
This examples will be translated into something like this:
- TemplateClass.prototype.appendBlockA = function() {
+ TemplateClass.prototype.appendBlockA = function () {
for (var i=0; i<10; i++) {
this.appendBlockB();
}
};
- TemplateClass.prototype.appendBlockB = function() {
+ TemplateClass.prototype.appendBlockB = function () {
this.append(i);
};
View
2  bin/ojster
@@ -74,7 +74,7 @@ if (argv.ext) {
options.ext = argv.ext;
}
-ojster.compilePath(srcPath, dstPath, options, function(err, results) {
+ojster.compilePath(srcPath, dstPath, options, function (err, results) {
if (err) {
process.exit(1);
}
View
34 client/goog/ojster.js
@@ -9,18 +9,18 @@ goog.require('goog.dom.TagName');
/**
* @constructor
*/
-ojster.StringWriter = function() {
+ojster.StringWriter = function () {
this.buff = [];
};
-ojster.StringWriter.prototype.write = function() {
+ojster.StringWriter.prototype.write = function () {
this.buff.push.apply(this.buff, arguments);
};
/**
* @return {string}
*/
-ojster.StringWriter.prototype.done = function() {
+ojster.StringWriter.prototype.done = function () {
return this.buff.join('');
};
@@ -33,7 +33,7 @@ ojster.DefaultWriterClass = ojster.StringWriter;
* @param {Object=} opt_writer
* @constructor
*/
-ojster.Template = function(opt_data, opt_ctx, opt_writer) {
+ojster.Template = function (opt_data, opt_ctx, opt_writer) {
/** @type {Object} */
this.data = opt_data || null;
/** @type {Object} */
@@ -48,13 +48,13 @@ ojster.Template = function(opt_data, opt_ctx, opt_writer) {
this.init();
};
-ojster.Template.prototype.init = function() {
+ojster.Template.prototype.init = function () {
};
/**
- * @param {function(ojster.Template)} props
+ * @param {function (ojster.Template)} props
*/
-ojster.Template.prototype.setup = function(setupFunc) {
+ojster.Template.prototype.setup = function (setupFunc) {
setupFunc.call(this);
return this;
};
@@ -62,14 +62,14 @@ ojster.Template.prototype.setup = function(setupFunc) {
/**
* @return {?string}
*/
-ojster.Template.prototype.getBaseCssName = function(setupFunc) {
+ojster.Template.prototype.getBaseCssName = function (setupFunc) {
return this.baseCssName;
};
/**
* @param {?string} baseCssName
*/
-ojster.Template.prototype.setBaseCssName = function(baseCssName) {
+ojster.Template.prototype.setBaseCssName = function (baseCssName) {
this.baseCssName = baseCssName;
};
@@ -77,14 +77,14 @@ ojster.Template.prototype.setBaseCssName = function(baseCssName) {
* @param {string} str
* @return {string}
*/
-ojster.Template.prototype.escape = function(str) {
+ojster.Template.prototype.escape = function (str) {
return ojster.escape(str);
};
/**
* @return {string}
*/
-ojster.Template.prototype.render = function() {
+ojster.Template.prototype.render = function () {
// ensure we have a writer
if (this.writer == null) {
this.writer = new ojster.DefaultWriterClass();
@@ -98,12 +98,12 @@ ojster.Template.prototype.render = function() {
/**
* @param {ojster.Template} template
*/
-ojster.Template.prototype.renderTo = function(template) {
+ojster.Template.prototype.renderTo = function (template) {
this.writer = template.writer;
this.renderBlockMain();
};
-ojster.Template.prototype.renderBlockMain = function() {
+ojster.Template.prototype.renderBlockMain = function () {
throw new Error('Not implemented');
};
@@ -118,7 +118,7 @@ ojster.Template.prototype.renderBlockMain = function() {
*     characters to occur in your strings, such as if you are escaping HTML.
* @return {string}
*/
-ojster.escape = function(str, opt_isLikelyToContainHtmlChars) {
+ojster.escape = function (str, opt_isLikelyToContainHtmlChars) {
if (str != null) {
str = goog.string.htmlEscape(str, opt_isLikelyToContainHtmlChars);
}
@@ -130,7 +130,7 @@ ojster.escape = function(str, opt_isLikelyToContainHtmlChars) {
* @param {ojster.Template} template
* @return {Element}
*/
-ojster.fillElement = function(element, template) {
+ojster.fillElement = function (element, template) {
element.innerHTML = template.render();
return element;
};
@@ -140,7 +140,7 @@ ojster.fillElement = function(element, template) {
* @param {goog.dom.DomHelper=} opt_domHelper
* @return {Element}
*/
-ojster.createElement = function(template, opt_domHelper) {
+ojster.createElement = function (template, opt_domHelper) {
/** @type {goog.dom.DomHelper} */
var dom = opt_domHelper || goog.dom.getDomHelper();
/** @type {Element} */
@@ -164,7 +164,7 @@ ojster.createElement = function(template, opt_domHelper) {
* @param {goog.dom.DomHelper=} opt_domHelper
* @return {Node}
*/
-ojster.createFragment = function(template, opt_domHelper) {
+ojster.createFragment = function (template, opt_domHelper) {
var dom = opt_domHelper || goog.dom.getDomHelper();
return dom.htmlToDocumentFragment(template.render());
};
View
34 client/universal/ojster.js
@@ -19,20 +19,20 @@
}(this, function () {
"use strict";
-var StringWriter = function() {
+var StringWriter = function () {
this.buff = [];
};
-StringWriter.prototype.write = function() {
+StringWriter.prototype.write = function () {
this.buff.push.apply(this.buff, arguments);
};
-StringWriter.prototype.done = function() {
+StringWriter.prototype.done = function () {
return this.buff.join('');
};
-var Template = function(opt_data, opt_ctx, opt_writer) {
+var Template = function (opt_data, opt_ctx, opt_writer) {
this.data = opt_data || null;
this.ctx = opt_ctx || null;
this.writer = opt_writer || null;
@@ -42,31 +42,31 @@ var Template = function(opt_data, opt_ctx, opt_writer) {
this.init();
};
-Template.prototype.init = function() {
+Template.prototype.init = function () {
};
-Template.prototype.setup = function(setupFunc) {
+Template.prototype.setup = function (setupFunc) {
setupFunc.call(this);
return this;
};
-Template.prototype.getBaseCssName = function(setupFunc) {
+Template.prototype.getBaseCssName = function (setupFunc) {
return this.baseCssName;
};
-Template.prototype.setBaseCssName = function(baseCssName) {
+Template.prototype.setBaseCssName = function (baseCssName) {
this.baseCssName = baseCssName;
};
-Template.prototype.escape = function(str) {
+Template.prototype.escape = function (str) {
return Template.escape(str);
};
-Template.prototype.createWriter = function() {
+Template.prototype.createWriter = function () {
return new StringWriter();
};
-Template.prototype.render = function() {
+Template.prototype.render = function () {
// ensure we have a writer
if (this.writer == null) {
this.writer = this.createWriter();
@@ -77,12 +77,12 @@ Template.prototype.render = function() {
return this.writer.done();
};
-Template.prototype.renderTo = function(template) {
+Template.prototype.renderTo = function (template) {
this.writer = template.writer;
this.renderBlockMain();
};
-Template.prototype.renderBlockMain = function() {
+Template.prototype.renderBlockMain = function () {
throw new Error('Not implemented');
};
@@ -95,7 +95,7 @@ var gtRe = />/g;
var dqRe = /"/g;
var needEscRe = /[&<>"]/;
-var escape = function(str, opt_isLikelyToContainHtmlChars) {
+var escape = function (str, opt_isLikelyToContainHtmlChars) {
if (str != null) {
if (opt_isLikelyToContainHtmlChars) {
str = (str+'')
@@ -121,12 +121,12 @@ var escape = function(str, opt_isLikelyToContainHtmlChars) {
return str;
};
-var fillElement = function(element, template) {
+var fillElement = function (element, template) {
element.innerHTML = template.render();
return element;
};
-var createElement = function(template) {
+var createElement = function (template) {
var wrapper = document.createElement('div');
wrapper.innerHTML = (template.constructor === String ? template : template.render());
@@ -141,7 +141,7 @@ var createElement = function(template) {
return wrapper;
};
-var createFragment = function(template, opt_skipIeWorkaround) {
+var createFragment = function (template, opt_skipIeWorkaround) {
var htmlString = (template.constructor === String ? template : template.render());
var tempDiv = document.createElement('div');
if (!opt_skipIeWorkaround) {
View
4 examples/client/compiled/amd/base.js
@@ -18,7 +18,7 @@ function abc() {
// @template and @inherits need alias only
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -28,7 +28,7 @@ inherits(Base, ojster.Template);
var tmp1 = Base.prototype;
-Base.prototype.renderBlockMain = function() { // @25:1
+Base.prototype.renderBlockMain = function () { // @25:1
var self = this;
var d = this.data, vars = this.vars;
};
View
4 examples/client/compiled/browserglobals/base.js
@@ -21,7 +21,7 @@ function abc() {
// @template and @inherits need alias only
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -31,7 +31,7 @@ inherits(Base, ojster.Template);
var tmp1 = Base.prototype;
-Base.prototype.renderBlockMain = function() { // @25:1
+Base.prototype.renderBlockMain = function () { // @25:1
var self = this;
var d = this.data, vars = this.vars;
};
View
4 examples/client/compiled/universal/base.js
@@ -27,7 +27,7 @@ function abc() {
// @template and @inherits need alias only
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -37,7 +37,7 @@ inherits(Base, ojster.Template);
var tmp1 = Base.prototype;
-Base.prototype.renderBlockMain = function() { // @25:1
+Base.prototype.renderBlockMain = function () { // @25:1
var self = this;
var d = this.data, vars = this.vars;
};
View
4 examples/goog/templates/base.js
@@ -13,7 +13,7 @@ goog.require('ojster.example.templates.Tools.SomeTool');
* @constructor
* @extends {ojster.Template}
*/
-ojster.example.templates.Base = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.templates.Base = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
goog.inherits(ojster.example.templates.Base, ojster.Template);
@@ -28,7 +28,7 @@ ojster.example.templates.Base.twistScore = function(value) {
};
-ojster.example.templates.Base.prototype.renderBlockMain = function() { // @18:1
+ojster.example.templates.Base.prototype.renderBlockMain = function () { // @18:1
var self = this;
var d = this.data, vars = this.vars;
View
6 examples/goog_scope/templates/base.js
@@ -10,7 +10,7 @@ goog.require('ojster.examples.somemodule');
// any aliases defined above can be used within scope,
// because they will be explicitly defined
-goog.scope(function() {
+goog.scope(function () {
"use strict";
var SomeClass = ojster.examples.somemodule.sub.SomeClass;
@@ -22,7 +22,7 @@ var SomeClass = ojster.examples.somemodule.sub.SomeClass;
* @constructor
* @extends {ojster.Template}
*/
-ojster.example.templates.Base = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.templates.Base = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
var Base = ojster.example.templates.Base;
@@ -36,7 +36,7 @@ var tmp = Base.prototype; // using alias
var tmp1 = ojster.example.templates.Base; // fully qualified names can be used as well
-Base.prototype.renderBlockMain = function() { // @20:1
+Base.prototype.renderBlockMain = function () { // @20:1
var self = this;
var d = this.data, vars = this.vars;
View
4 examples/node/templates/base.js
@@ -20,7 +20,7 @@ var ojster = require('ojster'); // equivalent to: ojster = 'ojster'
var MyLib = require('./my_lib');
// @template and @inherits need alias only
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -30,7 +30,7 @@ inherits(Base, ojster.Template);
var tmp1 = Base.prototype;
-Base.prototype.renderBlockMain = function() { // @27:1
+Base.prototype.renderBlockMain = function () { // @27:1
var self = this;
var d = this.data, vars = this.vars;
};
View
2  examples/somemodule.js
@@ -1,7 +1,7 @@
"use strict";
// fake module for examples
-var SomeClass = function() {
+var SomeClass = function () {
};
var sub = {
View
19 examples/universal/compiled/client/amd/base.js
@@ -11,7 +11,7 @@ define(['../../../../lib', '../../../somemodule'], function (ojster, SomeClass)
var SomeClass = ojster.examples.somemodule.sub.SomeClass;
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -29,7 +29,7 @@ inherits(Base, ojster.Template);
// so, enabling goog.scope can sometimes be the only way to get trully universal template
-Base.prototype.renderBlockMain = function() { // @24:1
+Base.prototype.renderBlockMain = function () { // @24:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -54,42 +54,41 @@ Base.prototype.renderBlockMain = function() { // @24:1
);
}; // @35:1
-Base.prototype.renderBlockMeta = function() { // @28:1
+Base.prototype.renderBlockMeta = function () { // @28:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTitle = function() { // @29:8
+Base.prototype.renderBlockTitle = function () { // @29:8
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockCss = function() { // @30:1
+Base.prototype.renderBlockCss = function () { // @30:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockScript = function() { // @31:1
+Base.prototype.renderBlockScript = function () { // @31:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockContent = function() { // @33:7
+Base.prototype.renderBlockContent = function () { // @33:7
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest1 = function() { // @37:1
+Base.prototype.renderBlockTest1 = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest2 = function(a, b) { // @39:1
+Base.prototype.renderBlockTest2 = function (a, b) { // @39:1
var self = this;
var d = this.data, vars = this.vars;
};
-
return Base;
});
View
4 examples/universal/compiled/client/amd/hobbies.js
@@ -4,12 +4,12 @@ define(['../../../../lib'], function (ojster) {
"use strict";
// normally here will be just 'ojster'
-var Hobbies = function(opt_data, opt_ctx, opt_writer) {
+var Hobbies = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Hobbies, ojster.Template);
-Hobbies.prototype.renderBlockMain = function() { // @6:1
+Hobbies.prototype.renderBlockMain = function () { // @6:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
32 examples/universal/compiled/client/amd/person.js
@@ -13,12 +13,12 @@ var Hobbies = ojster.example.templates.Hobbies;
var SomeTool = ojster.example.templates.Tools.SomeTool;
var SomeOtherTool = ojster.example.templates.Tools.SomeOtherTool;
-var Person = function(opt_data, opt_ctx, opt_writer) {
+var Person = function (opt_data, opt_ctx, opt_writer) {
Base.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Person, Base);
-Person.prototype.init = function() { // @10:1
+Person.prototype.init = function () { // @10:1
var self = this;
var d = this.data, vars = this.vars;
Base.prototype.init.call(this);
@@ -49,7 +49,7 @@ Person.prototype.calculateScore = function(person) {
// code could be here too, almost anywhere
-Person.prototype.renderBlockTitle = function() { // @37:1
+Person.prototype.renderBlockTitle = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -58,7 +58,7 @@ Person.prototype.renderBlockTitle = function() { // @37:1
);
}; // @37:40
-Person.prototype.renderBlockScript = function() { // @39:1
+Person.prototype.renderBlockScript = function () { // @39:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -74,7 +74,7 @@ Person.prototype.renderBlockScript = function() { // @39:1
);
}; // @48:1
-Person.prototype.renderBlockContent = function() { // @50:1
+Person.prototype.renderBlockContent = function () { // @50:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -132,7 +132,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
'-</div>' // @74:19
); // @76:5
new Hobbies(d, this.ctx).renderTo(self); // @76:5
- new SomeTool(d).setup(function() { var d = this.data, vars = this.vars;
+ new SomeTool(d).setup(function () { var d = this.data, vars = this.vars;
this.baseCssName = 'basecss1';
}).renderTo(self); // @78:5
new SomeOtherTool({
@@ -141,7 +141,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
}).renderTo(self); // @81:5
}; // @85:1
-Person.prototype.renderBlockFullName = function() { // @60:17
+Person.prototype.renderBlockFullName = function () { // @60:17
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -151,12 +151,12 @@ Person.prototype.renderBlockFullName = function() { // @60:17
);
}; // @60:76
-Person.prototype.renderBlockBeforeEvent = function() { // @67:13
+Person.prototype.renderBlockBeforeEvent = function () { // @67:13
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.renderBlockEcho = function(msg) { // @87:1
+Person.prototype.renderBlockEcho = function (msg) { // @87:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -164,7 +164,7 @@ Person.prototype.renderBlockEcho = function(msg) { // @87:1
);
}; // @89:1
-Person.prototype.renderBlockSkills = function() { // @91:1
+Person.prototype.renderBlockSkills = function () { // @91:1
var self = this;
var d = this.data, vars = this.vars;
@@ -195,7 +195,7 @@ Person.prototype.renderBlockSkills = function() { // @91:1
}; // @114:1
-Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
+Person.prototype.renderBlockParametrized = function (i, l, skill) { // @107:9
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -209,7 +209,7 @@ Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
);
}; // @109:9
-Person.prototype.renderBlockNoSkills = function() { // @116:1
+Person.prototype.renderBlockNoSkills = function () { // @116:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -217,19 +217,19 @@ Person.prototype.renderBlockNoSkills = function() { // @116:1
);
}; // @118:1
-Person.prototype.renderBlockAfterEvent = function() { // @120:1
+Person.prototype.renderBlockAfterEvent = function () { // @120:1
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.testFunc = function() { // @122:1
+Person.prototype.testFunc = function () { // @122:1
var self = this;
var d = this.data, vars = this.vars;
return 'testValue';
}; // @124:1
-Person.prototype.renderBlockTest1 = function() { // @126:1
+Person.prototype.renderBlockTest1 = function () { // @126:1
var self = this;
var d = this.data, vars = this.vars;
@@ -238,7 +238,7 @@ Person.prototype.renderBlockTest1 = function() { // @126:1
Base.prototype.renderBlockTest1.call(this); // @128:5
}; // @129:1
-Person.prototype.renderBlockTest2 = function(a) { // @131:1
+Person.prototype.renderBlockTest2 = function (a) { // @131:1
var self = this;
var d = this.data, vars = this.vars;
View
8 examples/universal/compiled/client/amd/tools.js
@@ -4,11 +4,11 @@ define(['../../../../lib'], function (ojster) {
"use strict";
// normally here will be just 'ojster'
-var SomeTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeTool, ojster.Template);
-SomeTool.prototype.renderBlockMain = function() { // @5:1
+SomeTool.prototype.renderBlockMain = function () { // @5:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -16,11 +16,11 @@ SomeTool.prototype.renderBlockMain = function() { // @5:1
);
}; // @7:1
-var SomeOtherTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeOtherTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeOtherTool, ojster.Template);
-SomeOtherTool.prototype.renderBlockMain = function() { // @11:1
+SomeOtherTool.prototype.renderBlockMain = function () { // @11:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
19 examples/universal/compiled/client/browserglobals/base.js
@@ -14,7 +14,7 @@
var SomeClass = ojster.examples.somemodule.sub.SomeClass;
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -32,7 +32,7 @@ inherits(Base, ojster.Template);
// so, enabling goog.scope can sometimes be the only way to get trully universal template
-Base.prototype.renderBlockMain = function() { // @24:1
+Base.prototype.renderBlockMain = function () { // @24:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -57,42 +57,41 @@ Base.prototype.renderBlockMain = function() { // @24:1
);
}; // @35:1
-Base.prototype.renderBlockMeta = function() { // @28:1
+Base.prototype.renderBlockMeta = function () { // @28:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTitle = function() { // @29:8
+Base.prototype.renderBlockTitle = function () { // @29:8
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockCss = function() { // @30:1
+Base.prototype.renderBlockCss = function () { // @30:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockScript = function() { // @31:1
+Base.prototype.renderBlockScript = function () { // @31:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockContent = function() { // @33:7
+Base.prototype.renderBlockContent = function () { // @33:7
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest1 = function() { // @37:1
+Base.prototype.renderBlockTest1 = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest2 = function(a, b) { // @39:1
+Base.prototype.renderBlockTest2 = function (a, b) { // @39:1
var self = this;
var d = this.data, vars = this.vars;
};
-
return Base;
}));
View
4 examples/universal/compiled/client/browserglobals/hobbies.js
@@ -7,12 +7,12 @@
"use strict";
// normally here will be just 'ojster'
-var Hobbies = function(opt_data, opt_ctx, opt_writer) {
+var Hobbies = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Hobbies, ojster.Template);
-Hobbies.prototype.renderBlockMain = function() { // @6:1
+Hobbies.prototype.renderBlockMain = function () { // @6:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
32 examples/universal/compiled/client/browserglobals/person.js
@@ -16,12 +16,12 @@ var Hobbies = ojster.example.templates.Hobbies;
var SomeTool = ojster.example.templates.Tools.SomeTool;
var SomeOtherTool = ojster.example.templates.Tools.SomeOtherTool;
-var Person = function(opt_data, opt_ctx, opt_writer) {
+var Person = function (opt_data, opt_ctx, opt_writer) {
Base.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Person, Base);
-Person.prototype.init = function() { // @10:1
+Person.prototype.init = function () { // @10:1
var self = this;
var d = this.data, vars = this.vars;
Base.prototype.init.call(this);
@@ -52,7 +52,7 @@ Person.prototype.calculateScore = function(person) {
// code could be here too, almost anywhere
-Person.prototype.renderBlockTitle = function() { // @37:1
+Person.prototype.renderBlockTitle = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -61,7 +61,7 @@ Person.prototype.renderBlockTitle = function() { // @37:1
);
}; // @37:40
-Person.prototype.renderBlockScript = function() { // @39:1
+Person.prototype.renderBlockScript = function () { // @39:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -77,7 +77,7 @@ Person.prototype.renderBlockScript = function() { // @39:1
);
}; // @48:1
-Person.prototype.renderBlockContent = function() { // @50:1
+Person.prototype.renderBlockContent = function () { // @50:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -135,7 +135,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
'-</div>' // @74:19
); // @76:5
new Hobbies(d, this.ctx).renderTo(self); // @76:5
- new SomeTool(d).setup(function() { var d = this.data, vars = this.vars;
+ new SomeTool(d).setup(function () { var d = this.data, vars = this.vars;
this.baseCssName = 'basecss1';
}).renderTo(self); // @78:5
new SomeOtherTool({
@@ -144,7 +144,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
}).renderTo(self); // @81:5
}; // @85:1
-Person.prototype.renderBlockFullName = function() { // @60:17
+Person.prototype.renderBlockFullName = function () { // @60:17
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -154,12 +154,12 @@ Person.prototype.renderBlockFullName = function() { // @60:17
);
}; // @60:76
-Person.prototype.renderBlockBeforeEvent = function() { // @67:13
+Person.prototype.renderBlockBeforeEvent = function () { // @67:13
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.renderBlockEcho = function(msg) { // @87:1
+Person.prototype.renderBlockEcho = function (msg) { // @87:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -167,7 +167,7 @@ Person.prototype.renderBlockEcho = function(msg) { // @87:1
);
}; // @89:1
-Person.prototype.renderBlockSkills = function() { // @91:1
+Person.prototype.renderBlockSkills = function () { // @91:1
var self = this;
var d = this.data, vars = this.vars;
@@ -198,7 +198,7 @@ Person.prototype.renderBlockSkills = function() { // @91:1
}; // @114:1
-Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
+Person.prototype.renderBlockParametrized = function (i, l, skill) { // @107:9
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -212,7 +212,7 @@ Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
);
}; // @109:9
-Person.prototype.renderBlockNoSkills = function() { // @116:1
+Person.prototype.renderBlockNoSkills = function () { // @116:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -220,19 +220,19 @@ Person.prototype.renderBlockNoSkills = function() { // @116:1
);
}; // @118:1
-Person.prototype.renderBlockAfterEvent = function() { // @120:1
+Person.prototype.renderBlockAfterEvent = function () { // @120:1
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.testFunc = function() { // @122:1
+Person.prototype.testFunc = function () { // @122:1
var self = this;
var d = this.data, vars = this.vars;
return 'testValue';
}; // @124:1
-Person.prototype.renderBlockTest1 = function() { // @126:1
+Person.prototype.renderBlockTest1 = function () { // @126:1
var self = this;
var d = this.data, vars = this.vars;
@@ -241,7 +241,7 @@ Person.prototype.renderBlockTest1 = function() { // @126:1
Base.prototype.renderBlockTest1.call(this); // @128:5
}; // @129:1
-Person.prototype.renderBlockTest2 = function(a) { // @131:1
+Person.prototype.renderBlockTest2 = function (a) { // @131:1
var self = this;
var d = this.data, vars = this.vars;
View
8 examples/universal/compiled/client/browserglobals/tools.js
@@ -7,11 +7,11 @@
"use strict";
// normally here will be just 'ojster'
-var SomeTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeTool, ojster.Template);
-SomeTool.prototype.renderBlockMain = function() { // @5:1
+SomeTool.prototype.renderBlockMain = function () { // @5:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -19,11 +19,11 @@ SomeTool.prototype.renderBlockMain = function() { // @5:1
);
}; // @7:1
-var SomeOtherTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeOtherTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeOtherTool, ojster.Template);
-SomeOtherTool.prototype.renderBlockMain = function() { // @11:1
+SomeOtherTool.prototype.renderBlockMain = function () { // @11:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
19 examples/universal/compiled/client/universal/base.js
@@ -20,7 +20,7 @@
var SomeClass = ojster.examples.somemodule.sub.SomeClass;
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -38,7 +38,7 @@ inherits(Base, ojster.Template);
// so, enabling goog.scope can sometimes be the only way to get trully universal template
-Base.prototype.renderBlockMain = function() { // @24:1
+Base.prototype.renderBlockMain = function () { // @24:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -63,42 +63,41 @@ Base.prototype.renderBlockMain = function() { // @24:1
);
}; // @35:1
-Base.prototype.renderBlockMeta = function() { // @28:1
+Base.prototype.renderBlockMeta = function () { // @28:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTitle = function() { // @29:8
+Base.prototype.renderBlockTitle = function () { // @29:8
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockCss = function() { // @30:1
+Base.prototype.renderBlockCss = function () { // @30:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockScript = function() { // @31:1
+Base.prototype.renderBlockScript = function () { // @31:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockContent = function() { // @33:7
+Base.prototype.renderBlockContent = function () { // @33:7
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest1 = function() { // @37:1
+Base.prototype.renderBlockTest1 = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest2 = function(a, b) { // @39:1
+Base.prototype.renderBlockTest2 = function (a, b) { // @39:1
var self = this;
var d = this.data, vars = this.vars;
};
-
return Base;
}));
View
4 examples/universal/compiled/client/universal/hobbies.js
@@ -13,12 +13,12 @@
"use strict";
// normally here will be just 'ojster'
-var Hobbies = function(opt_data, opt_ctx, opt_writer) {
+var Hobbies = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Hobbies, ojster.Template);
-Hobbies.prototype.renderBlockMain = function() { // @6:1
+Hobbies.prototype.renderBlockMain = function () { // @6:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
32 examples/universal/compiled/client/universal/person.js
@@ -22,12 +22,12 @@ var Hobbies = ojster.example.templates.Hobbies;
var SomeTool = ojster.example.templates.Tools.SomeTool;
var SomeOtherTool = ojster.example.templates.Tools.SomeOtherTool;
-var Person = function(opt_data, opt_ctx, opt_writer) {
+var Person = function (opt_data, opt_ctx, opt_writer) {
Base.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Person, Base);
-Person.prototype.init = function() { // @10:1
+Person.prototype.init = function () { // @10:1
var self = this;
var d = this.data, vars = this.vars;
Base.prototype.init.call(this);
@@ -58,7 +58,7 @@ Person.prototype.calculateScore = function(person) {
// code could be here too, almost anywhere
-Person.prototype.renderBlockTitle = function() { // @37:1
+Person.prototype.renderBlockTitle = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -67,7 +67,7 @@ Person.prototype.renderBlockTitle = function() { // @37:1
);
}; // @37:40
-Person.prototype.renderBlockScript = function() { // @39:1
+Person.prototype.renderBlockScript = function () { // @39:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -83,7 +83,7 @@ Person.prototype.renderBlockScript = function() { // @39:1
);
}; // @48:1
-Person.prototype.renderBlockContent = function() { // @50:1
+Person.prototype.renderBlockContent = function () { // @50:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -141,7 +141,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
'-</div>' // @74:19
); // @76:5
new Hobbies(d, this.ctx).renderTo(self); // @76:5
- new SomeTool(d).setup(function() { var d = this.data, vars = this.vars;
+ new SomeTool(d).setup(function () { var d = this.data, vars = this.vars;
this.baseCssName = 'basecss1';
}).renderTo(self); // @78:5
new SomeOtherTool({
@@ -150,7 +150,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
}).renderTo(self); // @81:5
}; // @85:1
-Person.prototype.renderBlockFullName = function() { // @60:17
+Person.prototype.renderBlockFullName = function () { // @60:17
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -160,12 +160,12 @@ Person.prototype.renderBlockFullName = function() { // @60:17
);
}; // @60:76
-Person.prototype.renderBlockBeforeEvent = function() { // @67:13
+Person.prototype.renderBlockBeforeEvent = function () { // @67:13
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.renderBlockEcho = function(msg) { // @87:1
+Person.prototype.renderBlockEcho = function (msg) { // @87:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -173,7 +173,7 @@ Person.prototype.renderBlockEcho = function(msg) { // @87:1
);
}; // @89:1
-Person.prototype.renderBlockSkills = function() { // @91:1
+Person.prototype.renderBlockSkills = function () { // @91:1
var self = this;
var d = this.data, vars = this.vars;
@@ -204,7 +204,7 @@ Person.prototype.renderBlockSkills = function() { // @91:1
}; // @114:1
-Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
+Person.prototype.renderBlockParametrized = function (i, l, skill) { // @107:9
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -218,7 +218,7 @@ Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
);
}; // @109:9
-Person.prototype.renderBlockNoSkills = function() { // @116:1
+Person.prototype.renderBlockNoSkills = function () { // @116:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -226,19 +226,19 @@ Person.prototype.renderBlockNoSkills = function() { // @116:1
);
}; // @118:1
-Person.prototype.renderBlockAfterEvent = function() { // @120:1
+Person.prototype.renderBlockAfterEvent = function () { // @120:1
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.testFunc = function() { // @122:1
+Person.prototype.testFunc = function () { // @122:1
var self = this;
var d = this.data, vars = this.vars;
return 'testValue';
}; // @124:1
-Person.prototype.renderBlockTest1 = function() { // @126:1
+Person.prototype.renderBlockTest1 = function () { // @126:1
var self = this;
var d = this.data, vars = this.vars;
@@ -247,7 +247,7 @@ Person.prototype.renderBlockTest1 = function() { // @126:1
Base.prototype.renderBlockTest1.call(this); // @128:5
}; // @129:1
-Person.prototype.renderBlockTest2 = function(a) { // @131:1
+Person.prototype.renderBlockTest2 = function (a) { // @131:1
var self = this;
var d = this.data, vars = this.vars;
View
8 examples/universal/compiled/client/universal/tools.js
@@ -13,11 +13,11 @@
"use strict";
// normally here will be just 'ojster'
-var SomeTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeTool, ojster.Template);
-SomeTool.prototype.renderBlockMain = function() { // @5:1
+SomeTool.prototype.renderBlockMain = function () { // @5:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -25,11 +25,11 @@ SomeTool.prototype.renderBlockMain = function() { // @5:1
);
}; // @7:1
-var SomeOtherTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeOtherTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeOtherTool, ojster.Template);
-SomeOtherTool.prototype.renderBlockMain = function() { // @11:1
+SomeOtherTool.prototype.renderBlockMain = function () { // @11:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
21 examples/universal/compiled/goog_scope/base.js
@@ -9,7 +9,7 @@ goog.require('ojster'); // normally here will be just 'ojster'
// example of handling subpath and subname
goog.require('ojster.examples.somemodule');
-goog.scope(function() {
+goog.scope(function () {
"use strict";
var SomeClass = ojster.examples.somemodule.sub.SomeClass;
@@ -21,7 +21,7 @@ var SomeClass = ojster.examples.somemodule.sub.SomeClass;
* @constructor
* @extends {ojster.Template}
*/
-ojster.example.Base = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.Base = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
var Base = ojster.example.Base;
@@ -40,7 +40,7 @@ goog.inherits(Base, ojster.Template);
// so, enabling goog.scope can sometimes be the only way to get trully universal template
-Base.prototype.renderBlockMain = function() { // @24:1
+Base.prototype.renderBlockMain = function () { // @24:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -65,40 +65,39 @@ Base.prototype.renderBlockMain = function() { // @24:1
);
}; // @35:1
-Base.prototype.renderBlockMeta = function() { // @28:1
+Base.prototype.renderBlockMeta = function () { // @28:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTitle = function() { // @29:8
+Base.prototype.renderBlockTitle = function () { // @29:8
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockCss = function() { // @30:1
+Base.prototype.renderBlockCss = function () { // @30:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockScript = function() { // @31:1
+Base.prototype.renderBlockScript = function () { // @31:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockContent = function() { // @33:7
+Base.prototype.renderBlockContent = function () { // @33:7
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest1 = function() { // @37:1
+Base.prototype.renderBlockTest1 = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest2 = function(a, b) { // @39:1
+Base.prototype.renderBlockTest2 = function (a, b) { // @39:1
var self = this;
var d = this.data, vars = this.vars;
};
-
}); // goog.scope
View
6 examples/universal/compiled/goog_scope/hobbies.js
@@ -4,7 +4,7 @@ goog.provide('ojster.example.templates.Hobbies');
goog.require('ojster'); // normally here will be just 'ojster'
-goog.scope(function() {
+goog.scope(function () {
"use strict";
/**
@@ -14,13 +14,13 @@ goog.scope(function() {
* @constructor
* @extends {ojster.Template}
*/
-ojster.example.templates.Hobbies = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.templates.Hobbies = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
var Hobbies = ojster.example.templates.Hobbies;
goog.inherits(Hobbies, ojster.Template);
-Hobbies.prototype.renderBlockMain = function() { // @6:1
+Hobbies.prototype.renderBlockMain = function () { // @6:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
34 examples/universal/compiled/goog_scope/person.js
@@ -8,7 +8,7 @@ goog.require('ojster.example.templates.Hobbies');
goog.require('ojster.example.templates.Tools.SomeTool');
goog.require('ojster.example.templates.Tools.SomeOtherTool');
-goog.scope(function() {
+goog.scope(function () {
"use strict";
var Base = ojster.example.templates.Base;
@@ -23,13 +23,13 @@ var SomeOtherTool = ojster.example.templates.Tools.SomeOtherTool;
* @constructor
* @extends {Base}
*/
-ojster.example.templates.Person = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.templates.Person = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
var Person = ojster.example.templates.Person;
goog.inherits(Person, Base);
-Person.prototype.init = function() { // @10:1
+Person.prototype.init = function () { // @10:1
var self = this;
var d = this.data, vars = this.vars;
goog.base(this, 'init');
@@ -60,7 +60,7 @@ Person.prototype.calculateScore = function(person) {
// code could be here too, almost anywhere
-Person.prototype.renderBlockTitle = function() { // @37:1
+Person.prototype.renderBlockTitle = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -69,7 +69,7 @@ Person.prototype.renderBlockTitle = function() { // @37:1
);
}; // @37:40
-Person.prototype.renderBlockScript = function() { // @39:1
+Person.prototype.renderBlockScript = function () { // @39:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -85,7 +85,7 @@ Person.prototype.renderBlockScript = function() { // @39:1
);
}; // @48:1
-Person.prototype.renderBlockContent = function() { // @50:1
+Person.prototype.renderBlockContent = function () { // @50:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -143,7 +143,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
'-</div>' // @74:19
); // @76:5
new Hobbies(d, this.ctx).renderTo(self); // @76:5
- new SomeTool(d).setup(function() { var d = this.data, vars = this.vars;
+ new SomeTool(d).setup(function () { var d = this.data, vars = this.vars;
this.baseCssName = 'basecss1';
}).renderTo(self); // @78:5
new SomeOtherTool({
@@ -152,7 +152,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
}).renderTo(self); // @81:5
}; // @85:1
-Person.prototype.renderBlockFullName = function() { // @60:17
+Person.prototype.renderBlockFullName = function () { // @60:17
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -162,12 +162,12 @@ Person.prototype.renderBlockFullName = function() { // @60:17
);
}; // @60:76
-Person.prototype.renderBlockBeforeEvent = function() { // @67:13
+Person.prototype.renderBlockBeforeEvent = function () { // @67:13
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.renderBlockEcho = function(msg) { // @87:1
+Person.prototype.renderBlockEcho = function (msg) { // @87:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -175,7 +175,7 @@ Person.prototype.renderBlockEcho = function(msg) { // @87:1
);
}; // @89:1
-Person.prototype.renderBlockSkills = function() { // @91:1
+Person.prototype.renderBlockSkills = function () { // @91:1
var self = this;
var d = this.data, vars = this.vars;
@@ -206,7 +206,7 @@ Person.prototype.renderBlockSkills = function() { // @91:1
}; // @114:1
-Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
+Person.prototype.renderBlockParametrized = function (i, l, skill) { // @107:9
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -220,7 +220,7 @@ Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
);
}; // @109:9
-Person.prototype.renderBlockNoSkills = function() { // @116:1
+Person.prototype.renderBlockNoSkills = function () { // @116:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -228,19 +228,19 @@ Person.prototype.renderBlockNoSkills = function() { // @116:1
);
}; // @118:1
-Person.prototype.renderBlockAfterEvent = function() { // @120:1
+Person.prototype.renderBlockAfterEvent = function () { // @120:1
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.testFunc = function() { // @122:1
+Person.prototype.testFunc = function () { // @122:1
var self = this;
var d = this.data, vars = this.vars;
return 'testValue';
}; // @124:1
-Person.prototype.renderBlockTest1 = function() { // @126:1
+Person.prototype.renderBlockTest1 = function () { // @126:1
var self = this;
var d = this.data, vars = this.vars;
@@ -249,7 +249,7 @@ Person.prototype.renderBlockTest1 = function() { // @126:1
goog.base(this, 'renderBlockTest1'); // @128:5
}; // @129:1
-Person.prototype.renderBlockTest2 = function(a) { // @131:1
+Person.prototype.renderBlockTest2 = function (a) { // @131:1
var self = this;
var d = this.data, vars = this.vars;
View
10 examples/universal/compiled/goog_scope/tools.js
@@ -5,7 +5,7 @@ goog.provide('ojster.example.templates.Tools.SomeOtherTool');
goog.require('ojster'); // normally here will be just 'ojster'
-goog.scope(function() {
+goog.scope(function () {
"use strict";
/**
@@ -15,12 +15,12 @@ goog.scope(function() {
* @constructor
* @extends {ojster.Template}
*/
-ojster.example.templates.Tools.SomeTool = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.templates.Tools.SomeTool = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
var SomeTool = ojster.example.templates.Tools.SomeTool;
goog.inherits(SomeTool, ojster.Template);
-SomeTool.prototype.renderBlockMain = function() { // @5:1
+SomeTool.prototype.renderBlockMain = function () { // @5:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -35,12 +35,12 @@ SomeTool.prototype.renderBlockMain = function() { // @5:1
* @constructor
* @extends {ojster.Template}
*/
-ojster.example.templates.Tools.SomeOtherTool = function(opt_data, opt_ctx, opt_writer) {
+ojster.example.templates.Tools.SomeOtherTool = function (opt_data, opt_ctx, opt_writer) {
goog.base(this, opt_data, opt_ctx, opt_writer);
};
var SomeOtherTool = ojster.example.templates.Tools.SomeOtherTool;
goog.inherits(SomeOtherTool, ojster.Template);
-SomeOtherTool.prototype.renderBlockMain = function() { // @11:1
+SomeOtherTool.prototype.renderBlockMain = function () { // @11:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
19 examples/universal/compiled/node/base.js
@@ -9,7 +9,7 @@ var ojster = require('../../../../lib'); // normally here will be just 'ojster'
// example of handling subpath and subname
var SomeClass = require('../../../somemodule').sub.SomeClass;
-var Base = function(opt_data, opt_ctx, opt_writer) {
+var Base = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Base, ojster.Template);
@@ -27,7 +27,7 @@ inherits(Base, ojster.Template);
// so, enabling goog.scope can sometimes be the only way to get trully universal template
-Base.prototype.renderBlockMain = function() { // @24:1
+Base.prototype.renderBlockMain = function () { // @24:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -52,40 +52,39 @@ Base.prototype.renderBlockMain = function() { // @24:1
);
}; // @35:1
-Base.prototype.renderBlockMeta = function() { // @28:1
+Base.prototype.renderBlockMeta = function () { // @28:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTitle = function() { // @29:8
+Base.prototype.renderBlockTitle = function () { // @29:8
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockCss = function() { // @30:1
+Base.prototype.renderBlockCss = function () { // @30:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockScript = function() { // @31:1
+Base.prototype.renderBlockScript = function () { // @31:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockContent = function() { // @33:7
+Base.prototype.renderBlockContent = function () { // @33:7
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest1 = function() { // @37:1
+Base.prototype.renderBlockTest1 = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
};
-Base.prototype.renderBlockTest2 = function(a, b) { // @39:1
+Base.prototype.renderBlockTest2 = function (a, b) { // @39:1
var self = this;
var d = this.data, vars = this.vars;
};
-
module.exports = Base;
View
4 examples/universal/compiled/node/hobbies.js
@@ -4,12 +4,12 @@
var inherits = require('util').inherits;
var ojster = require('../../../../lib'); // normally here will be just 'ojster'
-var Hobbies = function(opt_data, opt_ctx, opt_writer) {
+var Hobbies = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Hobbies, ojster.Template);
-Hobbies.prototype.renderBlockMain = function() { // @6:1
+Hobbies.prototype.renderBlockMain = function () { // @6:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
32 examples/universal/compiled/node/person.js
@@ -8,12 +8,12 @@ var Hobbies = require('./hobbies');
var SomeTool = require('./tools').SomeTool;
var SomeOtherTool = require('./tools').SomeOtherTool;
-var Person = function(opt_data, opt_ctx, opt_writer) {
+var Person = function (opt_data, opt_ctx, opt_writer) {
Base.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(Person, Base);
-Person.prototype.init = function() { // @10:1
+Person.prototype.init = function () { // @10:1
var self = this;
var d = this.data, vars = this.vars;
Base.prototype.init.call(this);
@@ -44,7 +44,7 @@ Person.prototype.calculateScore = function(person) {
// code could be here too, almost anywhere
-Person.prototype.renderBlockTitle = function() { // @37:1
+Person.prototype.renderBlockTitle = function () { // @37:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -53,7 +53,7 @@ Person.prototype.renderBlockTitle = function() { // @37:1
);
}; // @37:40
-Person.prototype.renderBlockScript = function() { // @39:1
+Person.prototype.renderBlockScript = function () { // @39:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -69,7 +69,7 @@ Person.prototype.renderBlockScript = function() { // @39:1
);
}; // @48:1
-Person.prototype.renderBlockContent = function() { // @50:1
+Person.prototype.renderBlockContent = function () { // @50:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -127,7 +127,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
'-</div>' // @74:19
); // @76:5
new Hobbies(d, this.ctx).renderTo(self); // @76:5
- new SomeTool(d).setup(function() { var d = this.data, vars = this.vars;
+ new SomeTool(d).setup(function () { var d = this.data, vars = this.vars;
this.baseCssName = 'basecss1';
}).renderTo(self); // @78:5
new SomeOtherTool({
@@ -136,7 +136,7 @@ Person.prototype.renderBlockContent = function() { // @50:1
}).renderTo(self); // @81:5
}; // @85:1
-Person.prototype.renderBlockFullName = function() { // @60:17
+Person.prototype.renderBlockFullName = function () { // @60:17
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -146,12 +146,12 @@ Person.prototype.renderBlockFullName = function() { // @60:17
);
}; // @60:76
-Person.prototype.renderBlockBeforeEvent = function() { // @67:13
+Person.prototype.renderBlockBeforeEvent = function () { // @67:13
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.renderBlockEcho = function(msg) { // @87:1
+Person.prototype.renderBlockEcho = function (msg) { // @87:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -159,7 +159,7 @@ Person.prototype.renderBlockEcho = function(msg) { // @87:1
);
}; // @89:1
-Person.prototype.renderBlockSkills = function() { // @91:1
+Person.prototype.renderBlockSkills = function () { // @91:1
var self = this;
var d = this.data, vars = this.vars;
@@ -190,7 +190,7 @@ Person.prototype.renderBlockSkills = function() { // @91:1
}; // @114:1
-Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
+Person.prototype.renderBlockParametrized = function (i, l, skill) { // @107:9
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -204,7 +204,7 @@ Person.prototype.renderBlockParametrized = function(i, l, skill) { // @107:9
);
}; // @109:9
-Person.prototype.renderBlockNoSkills = function() { // @116:1
+Person.prototype.renderBlockNoSkills = function () { // @116:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -212,19 +212,19 @@ Person.prototype.renderBlockNoSkills = function() { // @116:1
);
}; // @118:1
-Person.prototype.renderBlockAfterEvent = function() { // @120:1
+Person.prototype.renderBlockAfterEvent = function () { // @120:1
var self = this;
var d = this.data, vars = this.vars;
};
-Person.prototype.testFunc = function() { // @122:1
+Person.prototype.testFunc = function () { // @122:1
var self = this;
var d = this.data, vars = this.vars;
return 'testValue';
}; // @124:1
-Person.prototype.renderBlockTest1 = function() { // @126:1
+Person.prototype.renderBlockTest1 = function () { // @126:1
var self = this;
var d = this.data, vars = this.vars;
@@ -233,7 +233,7 @@ Person.prototype.renderBlockTest1 = function() { // @126:1
Base.prototype.renderBlockTest1.call(this); // @128:5
}; // @129:1
-Person.prototype.renderBlockTest2 = function(a) { // @131:1
+Person.prototype.renderBlockTest2 = function (a) { // @131:1
var self = this;
var d = this.data, vars = this.vars;
View
8 examples/universal/compiled/node/tools.js
@@ -4,11 +4,11 @@
var inherits = require('util').inherits;
var ojster = require('../../../../lib'); // normally here will be just 'ojster'
-var SomeTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeTool, ojster.Template);
-SomeTool.prototype.renderBlockMain = function() { // @5:1
+SomeTool.prototype.renderBlockMain = function () { // @5:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
@@ -16,11 +16,11 @@ SomeTool.prototype.renderBlockMain = function() { // @5:1
);
}; // @7:1
-var SomeOtherTool = function(opt_data, opt_ctx, opt_writer) {
+var SomeOtherTool = function (opt_data, opt_ctx, opt_writer) {
ojster.Template.call(this, opt_data, opt_ctx, opt_writer);
};
inherits(SomeOtherTool, ojster.Template);
-SomeOtherTool.prototype.renderBlockMain = function() { // @11:1
+SomeOtherTool.prototype.renderBlockMain = function () { // @11:1
var self = this;
var d = this.data, vars = this.vars;
self.writer.write(
View
10 lib/compiler/compile.js
@@ -10,7 +10,7 @@ var GenerationError = require('./generators/core/errors').GenerationError;
var defaultOptions = require('./options');
-var CompilationFailed = function(errors, tooManyErrors) {
+var CompilationFailed = function (errors, tooManyErrors) {
ErrorBase.call(this);
this.errors = errors;
@@ -24,17 +24,17 @@ inherits(CompilationFailed, ErrorBase);
CompilationFailed.prototype.name = 'CompilationFailed';
-CompilationFailed.prototype.setSrc = function(opt_filename, opt_src, opt_tabSize) {
+CompilationFailed.prototype.setSrc = function (opt_filename, opt_src, opt_tabSize) {
this.filename = opt_filename;
this.src = opt_src;
this.tabSize = opt_tabSize;
};
-CompilationFailed.prototype.getMessage = function(opt_filename, opt_src, opt_tabSize) {
+CompilationFailed.prototype.getMessage = function (opt_filename, opt_src, opt_tabSize) {
var filename = opt_filename || this.filename;
var src = opt_src || this.src;
var tabSize = (opt_tabSize == null ? this.tabSize : opt_tabSize);
- var preparedErrors = this.errors.map(function(v) {
+ var preparedErrors = this.errors.map(function (v) {
return v.getMessage(src, tabSize);
});
@@ -50,7 +50,7 @@ CompilationFailed.prototype.getMessage = function(opt_filename, opt_src, opt_tab
};
-var compile = function(src, options) {
+var compile = function (src, options) {
options = ops.cloneWithDefaults(options, defaultOptions);
options.tokenizer.tabSize = options.tabSize;