Closed rlidwka closed 9 years ago
:+1: for this, when maintaining a private registry it is really nice to be able to switch. The publishConfig
option in package.json is helpful so I don't have to think about it too often, but I would love a yaml publish <registryAlias>
. Would be very useful for packages where I might maintain a private version or two for internal use before/instead of publishing to the public registry.
Hmm... I thought this is resolved with scopes in npm@2
(which is merged here as well)? I forgot to close this issue.
Or are you talking about registry aliases?
It's only sort of solved with scopes; I find that I use a private registry for two things:
We also strongly restrict outgoing traffic from webserver instances, so a private repo that proxies public npm is great for that as well.
A feature I would really love to see is npm publish <registry>
or some variant of that, so I can be logged in to multiple registries at once and publish between one and the other without doing a login dance. Or is there a way to do that, that I'm missing?
A feature I would really love to see is
npm publish <registry>
or some variant of that
You can use npm publish --reg <registry>
.
Or you can specify publishConfig
for every private module in package descriptor file, and just run npm publish
.
--reg sounds exactly like what I'm looking for. Is that something you added, or is it in mainline npm? I don't see it documented anywhere. On 12/9/14 7:28 PM, Alex Kocharin wrote:
A feature I would really love to see is |npm publish <registry>| or some variant of that
You can use |npm publish --reg
|. Or you can specify |publishConfig| for every private module in package descriptor file, and just run |npm publish|.
— Reply to this email directly or view it on GitHub https://github.com/rlidwka/yapm/issues/14#issuecomment-66331780.
Is that something you added, or is it in mainline npm?
--reg
is a shortcut for --registry
, and it was in mainline npm from the very beginning.
It is a config key, but you can override any config key with a command-line argument or an environmental variable.
PS: npm@1.4
or earlier versions can't be simultaneously logged into different registries, it was fixed in yapm@1.4
and npm@2
.
Thanks. Very sorry to have wasted your time with something that is already in there - thanks for bearing with me. On 12/9/14 7:46 PM, Alex Kocharin wrote:
Is that something you added, or is it in mainline npm?
|--reg| is a shortcut for |--registry|, and it was in mainline npm from the very beginning.
It is a config key, but you can override any config key with a command-line argument or an environmental variable.
PS: |npm@1.4| or earlier versions can't be simultaneously logged into different registries, it was fixed in |yapm@1.4| and |npm@2|.
— Reply to this email directly or view it on GitHub https://github.com/rlidwka/yapm/issues/14#issuecomment-66334630.
+
Especially important if we're publishing different modules to two different places.