diff options
Diffstat (limited to 'lib/handlebars/compiler/javascript-compiler.js')
-rw-r--r-- | lib/handlebars/compiler/javascript-compiler.js | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js index 4548c6a..49660ff 100644 --- a/lib/handlebars/compiler/javascript-compiler.js +++ b/lib/handlebars/compiler/javascript-compiler.js @@ -1,18 +1,12 @@ -var compilerbase = require("./base"); +import { COMPILER_REVISION, REVISION_CHANGES } from "handlebars/base"; -exports.attach = function(Handlebars) { - -compilerbase.attach(Handlebars); - -// BEGIN(BROWSER) -/*jshint eqnull:true*/ - -var Literal = function(value) { +function Literal(value) { this.value = value; }; -var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {}; +function JavaScriptCompiler() {}; +export default JavaScriptCompiler; JavaScriptCompiler.prototype = { // PUBLIC API: You can override these methods in a subclass to provide @@ -162,8 +156,8 @@ JavaScriptCompiler.prototype = { var source = this.mergeSource(); if (!this.isChild) { - var revision = Handlebars.COMPILER_REVISION, - versions = Handlebars.REVISION_CHANGES[revision]; + var revision = COMPILER_REVISION, + versions = REVISION_CHANGES[revision]; source = "this.compilerInfo = ["+revision+",'"+versions+"'];\n"+source; } @@ -848,9 +842,3 @@ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { } return false; }; - -// END(BROWSER) - -return Handlebars; - -}; |