-
Notifications
You must be signed in to change notification settings - Fork 5
Add build step #27
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
Add build step #27
Conversation
.babelrc
Outdated
| "presets": [ | ||
| ["@babel/preset-env", { | ||
| "targets": { | ||
| "browsers": ["last 2 versions"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want last 2 versions ? I'd assume you'd want browserslist's "defaults"
https://github.com/browserslist/browserslist#best-practices
Edit: also the babel docs have a note by targets.browsers
https://babeljs.io/docs/en/babel-preset-env#targetsbrowsers
Note: this will be removed in later version in favor of just setting "targets" to a query directly.
so I think instead you'd just want "targets": <browserslist query>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last 2 versions only because that's what clay-kiln uses. defaults might be better anyways since it's more broad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah - I didn't realize that was in sync with clay-kiln. Using whatever clay-kiln has is probably best then to keep things consistent :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or defaults haha - maybe the clay team will have an opinion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything that supports the version clay-kiln uses is fine. defaults sounds like a good choice.
Reverts the previous merge that removes destructuring usages in favor of a build step similar to clay-kiln, in order to ensure ES5 output compatible with all browsers.
Adds the following npm scripts:
npm run prepublishOnlyfor a production build before publishing to npmnpm run buildornpm run watchfor a development buildOnly the output bundle will be published to npm, rather than the source/test suite.