-
Notifications
You must be signed in to change notification settings - Fork 14
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
When exposing flow definitions with forceFlow
maybe source files needs to be copied with .flow
prefix
#50
Comments
So you are suggesting appending a The tricky thing is I think then paths/imports would have to be rewritten. I'm curious to learn more about why publishing the original source be an issue, can you elaborate? |
@rtsao , I see what you mean. I guess your strategy is a bit different here. Since you create a brand new What I have seen people do is they provide untouched raw js.flow files alongside with compiled ones. So currently the structure cup generates looks like this for example:
What I have seen libs do is the following:
Then you shouldn't need to do anything about paths, and you avoid exposing your raw code to the consumers (ie it is not accessible via js There is a util to do this. Baseweb has a custom script Here is github discussion about the best strategies to expose flow types for a lib |
I see, thanks. I think the original reasoning for the current design is twofold:
I felt like the current approach is the simplest implementation. I think your suggestion would also work fine though. If you wanted to put up a PR, I'd be happy to review! Would you help me understand the motivation behind hiding the original source? If consumers are importing that directly, isn't that their prerogative? I suppose the issue is it potentially implies (falsely) that the |
Yes, exactly. I can extend on this reasoning, but this is exactly the point. Ok, I will craft a PR. Thank you 😊 |
So the actual
raw
javascript files are not made public/accessible in the distributable unintentionally.cc @lhorie
The text was updated successfully, but these errors were encountered: