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

Add support for flow in babel #77

Merged
merged 5 commits into from
Dec 10, 2018
Merged

Add support for flow in babel #77

merged 5 commits into from
Dec 10, 2018

Conversation

weyert
Copy link
Contributor

@weyert weyert commented Dec 10, 2018

Detects whether flow-bin is a dependency on the project, if so it will load the @babel/preset-flow-module.

What:

In babelrc.js we should check if flow-bin is a dependency and then load the @babel/preset-flow

Why:
We have copied the same away react is being detected by using ifAnyDep-utility

How:

Small change to babelrc.js

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one last thing!

README.md Outdated
@@ -111,6 +112,10 @@ module.exports = Object.assign(jestConfig, {
> configuring things to make it less magical and more straightforward. Extending
> can take place on your terms. I think this is actually a great way to do this.

### Flow support

If the `flow-bin` is a dependency on the project the `@babel/preset-flow` will automatically get loaded you only need to install it manually by running `npm install --save-dev @babel/preset-flow`
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated. They shouldn't have to install the preset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, forgot to update the text :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

Updated the text mentioning the flow support
Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kentcdodds kentcdodds merged commit 5d99117 into kentcdodds:master Dec 10, 2018
@kentcdodds
Copy link
Owner

🎉 This PR is included in version 0.48.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@weyert
Copy link
Contributor Author

weyert commented Dec 10, 2018

Great thanks, @kentcdodds!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants