aakropotkin / floco

Using Nix to put NPM and Yarn in a coffin
GNU General Public License v3.0
99 stars 4 forks source link

Customize registry #42

Closed terlar closed 1 year ago

terlar commented 1 year ago

Is it possible to customize the registry, e.g. to not use registry.npmjs.org, but instead a custom artifactory registry or similar.

I didn't find this in the docs or the source code.

aakropotkin commented 1 year ago

Yeah you definitely can, I use a private registry with it regularly. I haven't written good docs on it yet though.

I'm about to hop on a plane and will be pretty busy this week so probably not going to write a guide this week, but if you hop onto the Matrix chat I can walk you through the set up since that's a bit less effort than writing a guide.

On Sun, Apr 23, 2023, 5:06 PM Terje Larsen @.***> wrote:

Is it possible to customize the registry, e.g. to not use registry.npmjs.org, but instead a custom artifactory registry or similar.

I didn't find this in the docs or the source code.

— Reply to this email directly, view it on GitHub https://github.com/aakropotkin/floco/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3ORYQA3HETNQOTK54CH73XCWRWJANCNFSM6AAAAAAXIZPPFM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

terlar commented 1 year ago

Thank you for offering help, I took another look at the manpage/help output and spotted the:

  -- NPM-FLAGS...     Used to separate `floco translate registry' flags from `npm' flags.

So I figured out how to do it.

E.g. for the translate command, I did this:

nix run github:aakropotkin/floco -- translate -pt PKG -- --registry REGISTRY
terlar commented 1 year ago

Or perhaps you would like to have it open, until the documentation is in place? Either documentation about the NPM flags or explicitly about custom registry.