Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[packages] convert to ES6, add linting #169

Merged
merged 2 commits into from
Jul 19, 2017
Merged

Conversation

jchansen
Copy link
Contributor

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 (using require statements) and a es directory, where everything except the import/export statements are converted to ES5.

The es directory is then exposed as an entry point via the module field in the package.json file. Webpack 2 is configured to look for the module entry point before the main 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 of v0.13, along with making ES6/ESNext the primary syntax, and de-emphasizing ES5.

@jchansen jchansen merged commit 73f2b60 into master Jul 19, 2017
@jchansen jchansen deleted the provide-es6-modules branch August 29, 2023 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant