-
Notifications
You must be signed in to change notification settings - Fork 353
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
Tips for packaging the generated code as a npm package ? #522
Comments
Hey @alexisvisco , yeah this is a feature request in #212. I've been procrastinating jump in to it b/c surely at some point symbols are going to conflict (i.e. But, dunno, should probably just try an MVP version of it anyway, and see happens. I might work on this a little bit just to see how good/bad it goes, but no promises, and would be great if you wanted to pick up #212 directly. (For now closing this one as a dup of 212. Thanks!) |
I created a Go script that basically traverse the directory structure and write The problem is when you have multiples files in a package. When there is multiple files, I cannot do an For instance the leads service has 3 files generated. In the index.ts I am writing In theory this should works fine but your generation is giving me a hard time. There is in each files for a package the same exports :
When doing an |
Setting |
I am more experienced with go, but our frontend team would like to benefit from the protobuf code generation to import types.
So I give a try to the best typescript proto generator after trying many of them (your is the best IMO).
The generated output look like this:
I saw that the convenient way to publish a library is to have a entry point, an index.js or ts file.
I ask the question to people with more experience than me in the field of publishing libs to npm, especially typescript libs : how can you wrap this files to be use conveniently with types ?
I think the desired output for a lib is an dist/index.js and dist/index.d.ts, how can I got this output ?
The text was updated successfully, but these errors were encountered: