[packages] convert to ES6, add linting #169
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR converts all core lore packages to ES6 syntax and adds linting.
The primary reason for converting to ES6 syntax is to support tree-shaking, which requires generating a version of the transpiled code that leaves the import/export statements intact. This commonly results in packages being transpiled into multiple directory; a
lib
directory, contained the ES5 code (usingrequire
statements) and aes
directory, where everything except the import/export statements are converted to ES5.The
es
directory is then exposed as an entry point via themodule
field in thepackage.json
file. Webpack 2 is configured to look for themodule
entry point before themain
entry point, and will use that code if it exists.This PR does not expose the
module
entry point because it makes for a breaking change in any ES5-style Lore projects.The
module
entry point will be exposed as part ofv0.13
, along with making ES6/ESNext the primary syntax, and de-emphasizing ES5.