-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Question] what's the future of flow gen-flow-files? #5519
Comments
@calebmer any comments on this? Publishing typings to |
+1. It is clear that typing should live in |
Even if that is the case, it would be nice to have a guide about this - especially how to efficiently synchronize a library written with flow with |
Private npm packages should not distribute their flow types via a public flow-typed repository. For me it makes a lot more sense to distribute the types with the package. |
Our npm packages are also private. Theoretically we could create a private |
Yeah, we would love to have this be supported functionality too. We have a suite of internal npm modules that we consume across a couple of different projects that use flow - exporting flow types via the npm module is the preferred approach for us. |
I have pretty much the exact same use case as @chixor and I'm running into a wall. In our case, we have a bunch of internal packages and I don't want to maintain a ton of build toolchain for each one separately. We internally publish the raw ES6 source in each package and have the top-level consumer decide how to do the bundling, transpilation, etc. Developers work with The issue is that I either include I think what I really want is
index.js.flow
For (1) I've tried
But since I've tried refining my ignore to something like I've tried
but this complains that the the module can't be resolved (I guess I've tried
but this form seems to expect to find a I was at one point using It's worth noting that this is one thing that typescript does pretty well; their compiler can generate a |
Hmm looks like I can make my workflow work but only if I remove the The downside is I have to go and
Still it seems to be the lesser of two evils. |
In my opinion the typescript behaviour that reads an index.d.ts file is really comfortable. What about reading From the point of view of a user, flow is really promising, but this kind of conventions should be well defined and documented, and easy, in order to increase the tool adoption. |
@fibo That already works. If you import |
@SimenB thanks, I could not spot it in the documentation or some article. I guess that if user ignores node_modules this will still work. |
gen-flow-files is removed. A replacement is coming soon. |
@TrySound how soon? |
In my team we use flowtypes across multiple packages which are distributed by npm. In order to build those flowtypes into
/lib
dirs for consumption in other packages we're using the experimental flow cli commandflow gen-flow-files
.We prefer this option over the alternatives (eg, flow-copy-source) because it doesn't duplicate our entire source code in
/lib
, only the relevant flow rules.gen-flow-files
has been 'experimental' for over a year. I wanted to know what the plans are for this feature? Are there any? Is it being actively developed or just maintained? Has an alternative solution been discussed?I just want to get a sense of what you guys are thinking :)
Ping recent developers @mroch @gabelevi @ballardrog
The text was updated successfully, but these errors were encountered: