diff options
author | kpdecker <kpdecker@gmail.com> | 2015-04-16 15:42:46 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-04-16 16:43:01 -0500 |
commit | e3d3eda2e1e03e997d417affc09974446b4ca701 (patch) | |
tree | a6513f267482b1693fd002c20488c6e92095ff2b /lib/handlebars/compiler/code-gen.js | |
parent | 2a02261a5bc78f246c63dd8d467a12f2c1f63734 (diff) | |
download | handlebars.js-e3d3eda2e1e03e997d417affc09974446b4ca701.zip handlebars.js-e3d3eda2e1e03e997d417affc09974446b4ca701.tar.gz handlebars.js-e3d3eda2e1e03e997d417affc09974446b4ca701.tar.bz2 |
Add full support for es6
Converts the tool chain to use babel, eslint, and webpack vs. the previous proprietary solutions.
Additionally begins enforcing additional linting concerns as well as updates the code to reflect these rules.
Fixes #855
Fixes #993
Diffstat (limited to 'lib/handlebars/compiler/code-gen.js')
-rw-r--r-- | lib/handlebars/compiler/code-gen.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/handlebars/compiler/code-gen.js b/lib/handlebars/compiler/code-gen.js index 92020f0..0c40e00 100644 --- a/lib/handlebars/compiler/code-gen.js +++ b/lib/handlebars/compiler/code-gen.js @@ -1,4 +1,5 @@ -import {isArray} from "../utils"; +/*global define */ +import {isArray} from '../utils'; var SourceNode; @@ -56,7 +57,7 @@ function castChunk(chunk, codeGen, loc) { return ret; } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { // Handle primitives that the SourceNode will throw up on - return chunk+''; + return chunk + ''; } return chunk; } @@ -90,7 +91,7 @@ CodeGen.prototype = { }, empty: function(loc) { - loc = loc || this.currentLocation || {start:{}}; + loc = loc || this.currentLocation || {start: {}}; return new SourceNode(loc.start.line, loc.start.column, this.srcFile); }, wrap: function(chunk, loc) { @@ -98,7 +99,7 @@ CodeGen.prototype = { return chunk; } - loc = loc || this.currentLocation || {start:{}}; + loc = loc || this.currentLocation || {start: {}}; chunk = castChunk(chunk, this, loc); return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); |