gangbad.blogg.se

Npm config set save prefix
Npm config set save prefix






npm config set save prefix

  • npm's built-in configuration file ( /path/to/npm/npmrc).
  • global configuration file (defaults to $PREFIX/etc/npmrc configurable via CLI option -globalconfig or environment variable $NPM_CONFIG_GLOBALCONFIG).
  • per-user configuration file (defaults to $HOME/.npmrc configurable via CLI option -userconfig or environment variable $NPM_CONFIG_USERCONFIG).
  • per-project configuration file ( /path/to/my/project/.npmrc).
  • Notice that you need to use underscores instead of dashes, so -allow-same-version would become npm_config_allow_same_version=true. However, please note that inside npm-scripts npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set. Config values are case-insensitive, so NPM_CONFIG_FOO=bar will work the same. Any environment configurations that are not given a value will be given the value of true. For example, putting npm_config_foo=bar in your environment will set the foo configuration parameter to bar. Environment VariablesĪny environment variables that start with npm_config_ will be interpreted as a configuration parameter. Finally, -flag1 -flag2 - bar will set both configuration parameters to true, and the bar is taken as a command argument. Using -flag without specifying any value will set the value to true.Įxample: -flag1 -flag2 will set both configuration parameters to true, while -flag1 -flag2 bar will set flag1 to true, and flag2 to bar.

    npm config set save prefix

    A - argument tells the cli parser to stop reading flags. Putting -foo bar on the command line sets the foo configuration parameter to "bar".

    npm config set save prefix

    Npm gets its configuration values from the following sources, sorted by priority: Command Line Flags More than you probably want to know about npm configuration.








    Npm config set save prefix