npm's built-in configuration file ( /path/to/npm/npmrc).globalconfig or environment variable $NPM_CONFIG_GLOBALCONFIG) global configuration file (defaults to $PREFIX/etc/npmrc configurable via CLI option.userconfig or environment variable $NPM_CONFIG_USERCONFIG) per-user configuration file (defaults to $HOME/.npmrc configurable via CLI option.per-project configuration file ( /path/to/my/project/.npmrc).Notice that you need to use underscores instead of dashes, so -allow-same-version wouldīecome npm_config_allow_same_version=true. Lowercase versions over any uppercase ones that you might set. misc/scripts npm will set its own environment variables and Node will prefer those ![]() However, please note that inside npm-scripts Given a value will be given the value of true. Any environment configurations that are not Set the foo configuration parameter to bar. For example, putting npm_config_foo=bar in your environment will Will set both configuration parameters to true, and the bar is taken as a commandĪny environment variables that start with npm_config_ will be interpreted as aĬonfiguration parameter. Using -flag without specifying anyĮxample: -flag1 -flag2 will set both configuration parameters to true, while -flag1 -flag2 bar will set flag1 to true, and flag2 to bar. A -Īrgument tells the cli parser to stop reading flags. Putting -foo bar on the command line sets the foo configuration parameter to "bar". Npm gets its configuration values from the following sources, sorted by priority: ![]() ![]() NAME npm-config - More than you probably want to know about npm configuration
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |