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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user