Closed flaviouk closed 4 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/formium/tsdx/nqe6ek8zr
✅ Preview: https://tsdx-git-fork-imflavio-feat-support-npmrc.formium.vercel.app
So I was looking at CRA issues/PRs to potentially better understand the case for #502 and I found this issue regarding private registries: https://github.com/facebook/create-react-app/issues/8425
That issue is slightly different in that it's about installing a private template, not just private deps, but it's the same concept.
There they seem to recommend using a global ~/.npmrc
.
Then when I thought about it, I remembered a template shouldn't include its own .npmrc
, because it contains secrets. So I think using a global ~/.npmrc
makes more sense anyway. And further to that, generally templates are installed by users and not by robots, so you can just npm login
+ yarn login
beforehand and think you might not need any npmrc
then.
Using tsdx directly and copy pasting templates, instead of maintaining a custom tsdx.
I was building a modified version of TSDX (custom themes), and one of the issues I faced was that if templates had private packages, even though the template had a correct .npmrc the install step wouldn't pick it up and timeout, the solution was to use shelljs instead.
This would go hand in hand with https://github.com/formium/tsdx/pull/502 as well.