ni icon indicating copy to clipboard operation
ni copied to clipboard

`.nirc` `globalAgent` flag doesn't seem to work.

Open mrwwalmsley opened this issue 2 years ago • 3 comments

I have a .nirc file in the same directory as my package.json, but the globalAgent is ignored when installing global packages, and is using npm instead of pnpm.

Here is the contents of my .nirc file:

defaultAgent=pnpm
globalAgent=pnpm

mrwwalmsley avatar Jul 05 '22 04:07 mrwwalmsley

.nirc has to be under your home directory ~/.nirc

antfu avatar Jul 05 '22 05:07 antfu

Is it possible to read from the NPM package so we could commit to GIT? Was trying to make it as easy as possible for the whole team to switch to PNPM.

On another note, I assumed/hoped that nt would run npm test. Is there any reason you couldn't add that shortcut?

mrwwalmsley avatar Jul 28 '22 05:07 mrwwalmsley

Is it possible to read from the NPM package so we could commit to GIT?

We could have a ni field in package.json. PR Welcome

I assumed/hoped that nt would run npm test. Is there any reason you couldn't add that shortcut?

You can set your local alias. See https://github.com/antfu/dotfiles/blob/main/.zshrc#L23-L37

antfu avatar Jul 28 '22 07:07 antfu