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
This commit is contained in:
kpdecker
2015-04-16 15:42:46 -05:00
parent 2a02261a5b
commit e3d3eda2e1
51 changed files with 1785 additions and 1538 deletions
+5 -4
View File
@@ -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);