Initial work on ES6 modules
This commit is contained in:
@@ -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;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user