How to save npm configuration to .npmrc project file?

I hope to run npm config to set the values ​​in the .npmrc project file. Docs Do not tell me how to specify a file for saving values.

Looking for something like npm config --file /path/to/repo/.npmrc set key value

Trying to use it to build a script that should create a .npmrc file from env vars.

+6
source share
1 answer

You can make chroot , create your configuration file on ~/.npmrc , and then copy it to the desired location.

+1
source

Source: https://habr.com/ru/post/980549/


All Articles