https://github.com/kentcdodds/dist-flow-example
An example of how to distribute flow types for modules transpiled with babel and modules bundled with rollup.
https://github.com/kentcdodds/dist-flow-example
kcd-edu
Last synced: 6 months ago
JSON representation
An example of how to distribute flow types for modules transpiled with babel and modules bundled with rollup.
- Host: GitHub
- URL: https://github.com/kentcdodds/dist-flow-example
- Owner: kentcdodds
- Created: 2017-11-27T05:30:49.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2021-01-25T23:23:29.000Z (over 4 years ago)
- Last Synced: 2025-04-23T00:09:49.816Z (6 months ago)
- Topics: kcd-edu
- Language: JavaScript
- Homepage: https://blog.kentcdodds.com/3952ad38b357
- Size: 2.93 KB
- Stars: 18
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dist-flow-example
This is just an example that shows how to distribute flow types for modules
which use `babel` and/or `rollup`. In this example, we have `src/browser-module`
and `src/node-module` to demonstrate each. The `rollup` example _could_ use the
`flow gen-flow-files` command except it suffers from
[this issue](https://github.com/facebook/flow/issues/3281#issuecomment-344009783).
So instead, you can forward all exports in a file with the same name with
`.flow`. See the output in the `dist` directory and the scripts in the
`package.json`.I created this for [this blog post](https://blog.kentcdodds.com/3952ad38b357)
where I talk about doing this for my project `paypal-scripts`.