jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.26k stars 508 forks source link

How to use with Private NPM Distribution? #738

Closed neilchaudhuri closed 4 years ago

neilchaudhuri commented 4 years ago

First off, TSDX is great. Thank you all for open sourcing this.

I am building a React component library that needs to be published on a private Nexus NPM repo rather than actual NPM. So I need to be able to generate the tarball but push to a dedicated location besides NPM.

How can I configure TSDX to do this?

jaredpalmer commented 4 years ago

I think you can just add a script after build to zip the dist directory?

neilchaudhuri commented 4 years ago

Oh so just a yarn pack after build? Sounds good to me. Thanks.

agilgur5 commented 4 years ago

@neilchaudhuri TSDX does not currently touch your publish process at all, so this question is out-of-scope. I would recommend searching your question online because there are plenty of results, even plenty Nexus-specific -- here is one.

You don't need to generate a tarball and send it to some API, you can just set your publishConfig.registry in package.json as well as create an .npmrc so that you publish to a different registry. Nexus supports this format.

neilchaudhuri commented 4 years ago

I appreciate the feedback. Thanks. There are some other challenges specific to our current infrastructure that make matters not as straightforward as they should be, but this is all helpful going forward.