Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1243 lines
31 KiB

  1. npm-config(7) -- More than you probably want to know about npm configuration
  2. ============================================================================
  3. ## DESCRIPTION
  4. npm gets its configuration values from the following sources, sorted by priority:
  5. ### Command Line Flags
  6. Putting `--foo bar` on the command line sets the `foo` configuration
  7. parameter to `"bar"`. A `--` argument tells the cli parser to stop
  8. reading flags. Using `--flag` without specifying any value will set
  9. the value to `true`.
  10. Example: `--flag1 --flag2` will set both configuration parameters
  11. to `true`, while `--flag1 --flag2 bar` will set `flag1` to `true`,
  12. and `flag2` to `bar`. Finally, `--flag1 --flag2 -- bar` will set
  13. both configuration parameters to `true`, and the `bar` is taken
  14. as a command argument.
  15. ### Environment Variables
  16. Any environment variables that start with `npm_config_` will be
  17. interpreted as a configuration parameter. For example, putting
  18. `npm_config_foo=bar` in your environment will set the `foo`
  19. configuration parameter to `bar`. Any environment configurations that
  20. are not given a value will be given the value of `true`. Config
  21. values are case-insensitive, so `NPM_CONFIG_FOO=bar` will work the
  22. same. However, please note that inside [npm-scripts](/misc/scripts)
  23. npm will set its own environment variables and Node will prefer
  24. those lowercase versions over any uppercase ones that you might set.
  25. For details see [this issue](https://github.com/npm/npm/issues/14528).
  26. Notice that you need to use underscores instead of dashes, so `--allow-same-version`
  27. would become `npm_config_allow_same_version=true`.
  28. ### npmrc Files
  29. The four relevant files are:
  30. * per-project configuration file (`/path/to/my/project/.npmrc`)
  31. * per-user configuration file (defaults to `$HOME/.npmrc`; configurable via CLI
  32. option `--userconfig` or environment variable `$NPM_CONFIG_USERCONFIG`)
  33. * global configuration file (defaults to `$PREFIX/etc/npmrc`; configurable via
  34. CLI option `--globalconfig` or environment variable `$NPM_CONFIG_GLOBALCONFIG`)
  35. * npm's built-in configuration file (`/path/to/npm/npmrc`)
  36. See npmrc(5) for more details.
  37. ### Default Configs
  38. Run `npm config ls -l` to see a set of configuration parameters that are
  39. internal to npm, and are defaults if nothing else is specified.
  40. ## Shorthands and Other CLI Niceties
  41. The following shorthands are parsed on the command-line:
  42. * `-v`: `--version`
  43. * `-h`, `-?`, `--help`, `-H`: `--usage`
  44. * `-s`, `--silent`: `--loglevel silent`
  45. * `-q`, `--quiet`: `--loglevel warn`
  46. * `-d`: `--loglevel info`
  47. * `-dd`, `--verbose`: `--loglevel verbose`
  48. * `-ddd`: `--loglevel silly`
  49. * `-g`: `--global`
  50. * `-C`: `--prefix`
  51. * `-l`: `--long`
  52. * `-m`: `--message`
  53. * `-p`, `--porcelain`: `--parseable`
  54. * `-reg`: `--registry`
  55. * `-f`: `--force`
  56. * `-desc`: `--description`
  57. * `-S`: `--save`
  58. * `-P`: `--save-prod`
  59. * `-D`: `--save-dev`
  60. * `-O`: `--save-optional`
  61. * `-B`: `--save-bundle`
  62. * `-E`: `--save-exact`
  63. * `-y`: `--yes`
  64. * `-n`: `--yes false`
  65. * `ll` and `la` commands: `ls --long`
  66. If the specified configuration param resolves unambiguously to a known
  67. configuration parameter, then it is expanded to that configuration
  68. parameter. For example:
  69. npm ls --par
  70. # same as:
  71. npm ls --parseable
  72. If multiple single-character shorthands are strung together, and the
  73. resulting combination is unambiguously not some other configuration
  74. param, then it is expanded to its various component pieces. For
  75. example:
  76. npm ls -gpld
  77. # same as:
  78. npm ls --global --parseable --long --loglevel info
  79. ## Per-Package Config Settings
  80. When running scripts (see `npm-scripts(7)`) the package.json "config"
  81. keys are overwritten in the environment if there is a config param of
  82. `<name>[@<version>]:<key>`. For example, if the package.json has
  83. this:
  84. { "name" : "foo"
  85. , "config" : { "port" : "8080" }
  86. , "scripts" : { "start" : "node server.js" } }
  87. and the server.js is this:
  88. http.createServer(...).listen(process.env.npm_package_config_port)
  89. then the user could change the behavior by doing:
  90. npm config set foo:port 80
  91. See package.json(5) for more information.
  92. ## Config Settings
  93. ### access
  94. * Default: `restricted`
  95. * Type: Access
  96. When publishing scoped packages, the access level defaults to `restricted`. If
  97. you want your scoped package to be publicly viewable (and installable) set
  98. `--access=public`. The only valid values for `access` are `public` and
  99. `restricted`. Unscoped packages _always_ have an access level of `public`.
  100. ### allow-same-version
  101. * Default: false
  102. * Type: Boolean
  103. Prevents throwing an error when `npm version` is used to set the new version
  104. to the same value as the current version.
  105. ### always-auth
  106. * Default: false
  107. * Type: Boolean
  108. Force npm to always require authentication when accessing the registry,
  109. even for `GET` requests.
  110. ### also
  111. * Default: null
  112. * Type: String
  113. When "dev" or "development" and running local `npm shrinkwrap`,
  114. `npm outdated`, or `npm update`, is an alias for `--dev`.
  115. ### audit
  116. * Default: true
  117. * Type: Boolean
  118. When "true" submit audit reports alongside `npm install` runs to the default
  119. registry and all registries configured for scopes. See the documentation
  120. for npm-audit(1) for details on what is submitted.
  121. ### audit-level
  122. * Default: `"low"`
  123. * Type: `'low'`, `'moderate'`, `'high'`, `'critical'`
  124. The minimum level of vulnerability for `npm audit` to exit with
  125. a non-zero exit code.
  126. ### auth-type
  127. * Default: `'legacy'`
  128. * Type: `'legacy'`, `'sso'`, `'saml'`, `'oauth'`
  129. What authentication strategy to use with `adduser`/`login`.
  130. ### bin-links
  131. * Default: `true`
  132. * Type: Boolean
  133. Tells npm to create symlinks (or `.cmd` shims on Windows) for package
  134. executables.
  135. Set to false to have it not do this. This can be used to work around
  136. the fact that some file systems don't support symlinks, even on
  137. ostensibly Unix systems.
  138. ### browser
  139. * Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
  140. * Type: String
  141. The browser that is called by the `npm docs` command to open websites.
  142. ### ca
  143. * Default: The npm CA certificate
  144. * Type: String, Array or null
  145. The Certificate Authority signing certificate that is trusted for SSL
  146. connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines
  147. replaced by the string "\n". For example:
  148. ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
  149. Set to `null` to only allow "known" registrars, or to a specific CA cert
  150. to trust only that specific signing authority.
  151. Multiple CAs can be trusted by specifying an array of certificates:
  152. ca[]="..."
  153. ca[]="..."
  154. See also the `strict-ssl` config.
  155. ### cafile
  156. * Default: `null`
  157. * Type: path
  158. A path to a file containing one or multiple Certificate Authority signing
  159. certificates. Similar to the `ca` setting, but allows for multiple CA's, as
  160. well as for the CA information to be stored in a file on disk.
  161. ### cache
  162. * Default: Windows: `%AppData%\npm-cache`, Posix: `~/.npm`
  163. * Type: path
  164. The location of npm's cache directory. See `npm-cache(1)`
  165. ### cache-lock-stale
  166. * Default: 60000 (1 minute)
  167. * Type: Number
  168. The number of ms before cache folder lockfiles are considered stale.
  169. ### cache-lock-retries
  170. * Default: 10
  171. * Type: Number
  172. Number of times to retry to acquire a lock on cache folder lockfiles.
  173. ### cache-lock-wait
  174. * Default: 10000 (10 seconds)
  175. * Type: Number
  176. Number of ms to wait for cache lock files to expire.
  177. ### cache-max
  178. * Default: Infinity
  179. * Type: Number
  180. **DEPRECATED**: This option has been deprecated in favor of `--prefer-online`.
  181. `--cache-max=0` is an alias for `--prefer-online`.
  182. ### cache-min
  183. * Default: 10
  184. * Type: Number
  185. **DEPRECATED**: This option has been deprecated in favor of `--prefer-offline`.
  186. `--cache-min=9999 (or bigger)` is an alias for `--prefer-offline`.
  187. ### cert
  188. * Default: `null`
  189. * Type: String
  190. A client certificate to pass when accessing the registry. Values should be in
  191. PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:
  192. cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
  193. It is _not_ the path to a certificate file (and there is no "certfile" option).
  194. ### cidr
  195. * Default: `null`
  196. * Type: String, Array, null
  197. This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command.
  198. ### color
  199. * Default: true
  200. * Type: Boolean or `"always"`
  201. If false, never shows colors. If `"always"` then always shows colors.
  202. If true, then only prints color codes for tty file descriptors.
  203. This option can also be changed using the environment: colors are
  204. disabled when the environment variable `NO_COLOR` is set to any value.
  205. ### depth
  206. * Default: Infinity
  207. * Type: Number
  208. The depth to go when recursing directories for `npm ls`,
  209. `npm cache ls`, and `npm outdated`.
  210. For `npm outdated`, a setting of `Infinity` will be treated as `0`
  211. since that gives more useful information. To show the outdated status
  212. of all packages and dependents, use a large integer value,
  213. e.g., `npm outdated --depth 9999`
  214. ### description
  215. * Default: true
  216. * Type: Boolean
  217. Show the description in `npm search`
  218. ### dev
  219. * Default: false
  220. * Type: Boolean
  221. Install `dev-dependencies` along with packages.
  222. ### dry-run
  223. * Default: false
  224. * Type: Boolean
  225. Indicates that you don't want npm to make any changes and that it should
  226. only report what it would have done. This can be passed into any of the
  227. commands that modify your local installation, eg, `install`, `update`,
  228. `dedupe`, `uninstall`. This is NOT currently honored by some network related
  229. commands, eg `dist-tags`, `owner`, etc.
  230. ### editor
  231. * Default: `EDITOR` environment variable if set, or `"vi"` on Posix,
  232. or `"notepad"` on Windows.
  233. * Type: path
  234. The command to run for `npm edit` or `npm config edit`.
  235. ### engine-strict
  236. * Default: false
  237. * Type: Boolean
  238. If set to true, then npm will stubbornly refuse to install (or even
  239. consider installing) any package that claims to not be compatible with
  240. the current Node.js version.
  241. ### force
  242. * Default: false
  243. * Type: Boolean
  244. Makes various commands more forceful.
  245. * lifecycle script failure does not block progress.
  246. * publishing clobbers previously published versions.
  247. * skips cache when requesting from the registry.
  248. * prevents checks against clobbering non-npm files.
  249. ### fetch-retries
  250. * Default: 2
  251. * Type: Number
  252. The "retries" config for the `retry` module to use when fetching
  253. packages from the registry.
  254. ### fetch-retry-factor
  255. * Default: 10
  256. * Type: Number
  257. The "factor" config for the `retry` module to use when fetching
  258. packages.
  259. ### fetch-retry-mintimeout
  260. * Default: 10000 (10 seconds)
  261. * Type: Number
  262. The "minTimeout" config for the `retry` module to use when fetching
  263. packages.
  264. ### fetch-retry-maxtimeout
  265. * Default: 60000 (1 minute)
  266. * Type: Number
  267. The "maxTimeout" config for the `retry` module to use when fetching
  268. packages.
  269. ### git
  270. * Default: `"git"`
  271. * Type: String
  272. The command to use for git commands. If git is installed on the
  273. computer, but is not in the `PATH`, then set this to the full path to
  274. the git binary.
  275. ### git-tag-version
  276. * Default: `true`
  277. * Type: Boolean
  278. Tag the commit when using the `npm version` command.
  279. ### commit-hooks
  280. * Default: `true`
  281. * Type: Boolean
  282. Run git commit hooks when using the `npm version` command.
  283. ### global
  284. * Default: false
  285. * Type: Boolean
  286. Operates in "global" mode, so that packages are installed into the
  287. `prefix` folder instead of the current working directory. See
  288. `npm-folders(5)` for more on the differences in behavior.
  289. * packages are installed into the `{prefix}/lib/node_modules` folder, instead of the
  290. current working directory.
  291. * bin files are linked to `{prefix}/bin`
  292. * man pages are linked to `{prefix}/share/man`
  293. ### globalconfig
  294. * Default: {prefix}/etc/npmrc
  295. * Type: path
  296. The config file to read for global config options.
  297. ### global-style
  298. * Default: false
  299. * Type: Boolean
  300. Causes npm to install the package into your local `node_modules` folder with
  301. the same layout it uses with the global `node_modules` folder. Only your
  302. direct dependencies will show in `node_modules` and everything they depend
  303. on will be flattened in their `node_modules` folders. This obviously will
  304. eliminate some deduping. If used with `legacy-bundling`, `legacy-bundling` will be
  305. preferred.
  306. ### group
  307. * Default: GID of the current process
  308. * Type: String or Number
  309. The group to use when running package scripts in global mode as the root
  310. user.
  311. ### heading
  312. * Default: `"npm"`
  313. * Type: String
  314. The string that starts all the debugging log output.
  315. ### https-proxy
  316. * Default: null
  317. * Type: url
  318. A proxy to use for outgoing https requests. If the `HTTPS_PROXY` or
  319. `https_proxy` or `HTTP_PROXY` or `http_proxy` environment variables are set,
  320. proxy settings will be honored by the underlying `request` library.
  321. ### if-present
  322. * Default: false
  323. * Type: Boolean
  324. If true, npm will not exit with an error code when `run-script` is invoked for
  325. a script that isn't defined in the `scripts` section of `package.json`. This
  326. option can be used when it's desirable to optionally run a script when it's
  327. present and fail if the script fails. This is useful, for example, when running
  328. scripts that may only apply for some builds in an otherwise generic CI setup.
  329. ### ignore-prepublish
  330. * Default: false
  331. * Type: Boolean
  332. If true, npm will not run `prepublish` scripts.
  333. ### ignore-scripts
  334. * Default: false
  335. * Type: Boolean
  336. If true, npm does not run scripts specified in package.json files.
  337. ### init-module
  338. * Default: ~/.npm-init.js
  339. * Type: path
  340. A module that will be loaded by the `npm init` command. See the
  341. documentation for the
  342. [init-package-json](https://github.com/isaacs/init-package-json) module
  343. for more information, or npm-init(1).
  344. ### init-author-name
  345. * Default: ""
  346. * Type: String
  347. The value `npm init` should use by default for the package author's name.
  348. ### init-author-email
  349. * Default: ""
  350. * Type: String
  351. The value `npm init` should use by default for the package author's email.
  352. ### init-author-url
  353. * Default: ""
  354. * Type: String
  355. The value `npm init` should use by default for the package author's homepage.
  356. ### init-license
  357. * Default: "ISC"
  358. * Type: String
  359. The value `npm init` should use by default for the package license.
  360. ### init-version
  361. * Default: "1.0.0"
  362. * Type: semver
  363. The value that `npm init` should use by default for the package
  364. version number, if not already set in package.json.
  365. ### json
  366. * Default: false
  367. * Type: Boolean
  368. Whether or not to output JSON data, rather than the normal output.
  369. This feature is currently experimental, and the output data structures for many
  370. commands is either not implemented in JSON yet, or subject to change. Only the
  371. output from `npm ls --json` and `npm search --json` are currently valid.
  372. ### key
  373. * Default: `null`
  374. * Type: String
  375. A client key to pass when accessing the registry. Values should be in PEM
  376. format with newlines replaced by the string "\n". For example:
  377. key="-----BEGIN PRIVATE KEY-----\nXXXX\nXXXX\n-----END PRIVATE KEY-----"
  378. It is _not_ the path to a key file (and there is no "keyfile" option).
  379. ### legacy-bundling
  380. * Default: false
  381. * Type: Boolean
  382. Causes npm to install the package such that versions of npm prior to 1.4,
  383. such as the one included with node 0.8, can install the package. This
  384. eliminates all automatic deduping. If used with `global-style` this option
  385. will be preferred.
  386. ### link
  387. * Default: false
  388. * Type: Boolean
  389. If true, then local installs will link if there is a suitable globally
  390. installed package.
  391. Note that this means that local installs can cause things to be
  392. installed into the global space at the same time. The link is only done
  393. if one of the two conditions are met:
  394. * The package is not already installed globally, or
  395. * the globally installed version is identical to the version that is
  396. being installed locally.
  397. ### local-address
  398. * Default: undefined
  399. * Type: IP Address
  400. The IP address of the local interface to use when making connections
  401. to the npm registry. Must be IPv4 in versions of Node prior to 0.12.
  402. ### loglevel
  403. * Default: "notice"
  404. * Type: String
  405. * Values: "silent", "error", "warn", "notice", "http", "timing", "info",
  406. "verbose", "silly"
  407. What level of logs to report. On failure, *all* logs are written to
  408. `npm-debug.log` in the current working directory.
  409. Any logs of a higher level than the setting are shown. The default is "notice".
  410. ### logstream
  411. * Default: process.stderr
  412. * Type: Stream
  413. This is the stream that is passed to the
  414. [npmlog](https://github.com/npm/npmlog) module at run time.
  415. It cannot be set from the command line, but if you are using npm
  416. programmatically, you may wish to send logs to somewhere other than
  417. stderr.
  418. If the `color` config is set to true, then this stream will receive
  419. colored output if it is a TTY.
  420. ### logs-max
  421. * Default: 10
  422. * Type: Number
  423. The maximum number of log files to store.
  424. ### long
  425. * Default: false
  426. * Type: Boolean
  427. Show extended information in `npm ls` and `npm search`.
  428. ### maxsockets
  429. * Default: 50
  430. * Type: Number
  431. The maximum number of connections to use per origin (protocol/host/port
  432. combination). Passed to the `http` `Agent` used to make the request.
  433. ### message
  434. * Default: "%s"
  435. * Type: String
  436. Commit message which is used by `npm version` when creating version commit.
  437. Any "%s" in the message will be replaced with the version number.
  438. ### metrics-registry
  439. * Default: The value of `registry` (which defaults to "https://registry.npmjs.org/")
  440. * Type: String
  441. The registry you want to send cli metrics to if `send-metrics` is true.
  442. ### node-options
  443. * Default: null
  444. * Type: String
  445. Options to pass through to Node.js via the `NODE_OPTIONS` environment
  446. variable. This does not impact how npm itself is executed but it does
  447. impact how lifecycle scripts are called.
  448. ### node-version
  449. * Default: process.version
  450. * Type: semver or false
  451. The node version to use when checking a package's `engines` map.
  452. ### noproxy
  453. * Default: null
  454. * Type: String or Array
  455. A comma-separated string or an array of domain extensions that a proxy should not be used for.
  456. ### offline
  457. * Default: false
  458. * Type: Boolean
  459. Force offline mode: no network requests will be done during install. To allow
  460. the CLI to fill in missing cache data, see `--prefer-offline`.
  461. ### onload-script
  462. * Default: false
  463. * Type: path
  464. A node module to `require()` when npm loads. Useful for programmatic
  465. usage.
  466. ### only
  467. * Default: null
  468. * Type: String
  469. When "dev" or "development" and running local `npm install` without any
  470. arguments, only devDependencies (and their dependencies) are installed.
  471. When "dev" or "development" and running local `npm ls`, `npm outdated`, or
  472. `npm update`, is an alias for `--dev`.
  473. When "prod" or "production" and running local `npm install` without any
  474. arguments, only non-devDependencies (and their dependencies) are
  475. installed.
  476. When "prod" or "production" and running local `npm ls`, `npm outdated`, or
  477. `npm update`, is an alias for `--production`.
  478. ### optional
  479. * Default: true
  480. * Type: Boolean
  481. Attempt to install packages in the `optionalDependencies` object. Note
  482. that if these packages fail to install, the overall installation
  483. process is not aborted.
  484. ### otp
  485. * Default: null
  486. * Type: Number
  487. This is a one-time password from a two-factor authenticator. It's needed
  488. when publishing or changing package permissions with `npm access`.
  489. ### package-lock
  490. * Default: true
  491. * Type: Boolean
  492. If set to false, then ignore `package-lock.json` files when installing. This
  493. will also prevent _writing_ `package-lock.json` if `save` is true.
  494. When package package-locks are disabled, automatic pruning of extraneous
  495. modules will also be disabled. To remove extraneous modules with
  496. package-locks disabled use `npm prune`.
  497. This option is an alias for `--shrinkwrap`.
  498. ### package-lock-only
  499. * Default: false
  500. * Type: Boolean
  501. If set to true, it will update only the `package-lock.json`,
  502. instead of checking `node_modules` and downloading dependencies.
  503. ### parseable
  504. * Default: false
  505. * Type: Boolean
  506. Output parseable results from commands that write to
  507. standard output. For `npm search`, this will be tab-separated table format.
  508. ### prefer-offline
  509. * Default: false
  510. * Type: Boolean
  511. If true, staleness checks for cached data will be bypassed, but missing data
  512. will be requested from the server. To force full offline mode, use `--offline`.
  513. This option is effectively equivalent to `--cache-min=9999999`.
  514. ### prefer-online
  515. * Default: false
  516. * Type: Boolean
  517. If true, staleness checks for cached data will be forced, making the CLI look
  518. for updates immediately even for fresh package data.
  519. ### prefix
  520. * Default: see npm-folders(5)
  521. * Type: path
  522. The location to install global items. If set on the command line, then
  523. it forces non-global commands to run in the specified folder.
  524. ### preid
  525. * Default: ""
  526. * Type: String
  527. The "prerelease identifier" to use as a prefix for the "prerelease" part of a
  528. semver. Like the `rc` in `1.2.0-rc.8`.
  529. ### production
  530. * Default: false
  531. * Type: Boolean
  532. Set to true to run in "production" mode.
  533. 1. devDependencies are not installed at the topmost level when running
  534. local `npm install` without any arguments.
  535. 2. Set the NODE_ENV="production" for lifecycle scripts.
  536. ### progress
  537. * Default: true, unless TRAVIS or CI env vars set.
  538. * Type: Boolean
  539. When set to `true`, npm will display a progress bar during time intensive
  540. operations, if `process.stderr` is a TTY.
  541. Set to `false` to suppress the progress bar.
  542. ### proxy
  543. * Default: null
  544. * Type: url
  545. A proxy to use for outgoing http requests. If the `HTTP_PROXY` or
  546. `http_proxy` environment variables are set, proxy settings will be
  547. honored by the underlying `request` library.
  548. ### read-only
  549. * Default: false
  550. * Type: Boolean
  551. This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command.
  552. ### rebuild-bundle
  553. * Default: true
  554. * Type: Boolean
  555. Rebuild bundled dependencies after installation.
  556. ### registry
  557. * Default: https://registry.npmjs.org/
  558. * Type: url
  559. The base URL of the npm package registry.
  560. ### rollback
  561. * Default: true
  562. * Type: Boolean
  563. Remove failed installs.
  564. ### save
  565. * Default: true
  566. * Type: Boolean
  567. Save installed packages to a package.json file as dependencies.
  568. When used with the `npm rm` command, it removes it from the `dependencies`
  569. object.
  570. Only works if there is already a package.json file present.
  571. ### save-bundle
  572. * Default: false
  573. * Type: Boolean
  574. If a package would be saved at install time by the use of `--save`,
  575. `--save-dev`, or `--save-optional`, then also put it in the
  576. `bundleDependencies` list.
  577. When used with the `npm rm` command, it removes it from the
  578. bundledDependencies list.
  579. ### save-prod
  580. * Default: false
  581. * Type: Boolean
  582. Makes sure that a package will be saved into `dependencies` specifically. This
  583. is useful if a package already exists in `devDependencies` or
  584. `optionalDependencies`, but you want to move it to be a production dep. This is
  585. also the default behavior if `--save` is true, and neither `--save-dev` or
  586. `--save-optional` are true.
  587. ### save-dev
  588. * Default: false
  589. * Type: Boolean
  590. Save installed packages to a package.json file as `devDependencies`.
  591. When used with the `npm rm` command, it removes it from the
  592. `devDependencies` object.
  593. Only works if there is already a package.json file present.
  594. ### save-exact
  595. * Default: false
  596. * Type: Boolean
  597. Dependencies saved to package.json using `--save`, `--save-dev` or
  598. `--save-optional` will be configured with an exact version rather than
  599. using npm's default semver range operator.
  600. ### save-optional
  601. * Default: false
  602. * Type: Boolean
  603. Save installed packages to a package.json file as
  604. optionalDependencies.
  605. When used with the `npm rm` command, it removes it from the
  606. `devDependencies` object.
  607. Only works if there is already a package.json file present.
  608. ### save-prefix
  609. * Default: '^'
  610. * Type: String
  611. Configure how versions of packages installed to a package.json file via
  612. `--save` or `--save-dev` get prefixed.
  613. For example if a package has version `1.2.3`, by default its version is
  614. set to `^1.2.3` which allows minor upgrades for that package, but after
  615. `npm config set save-prefix='~'` it would be set to `~1.2.3` which only allows
  616. patch upgrades.
  617. ### scope
  618. * Default: the scope of the current project, if any, or ""
  619. * Type: String
  620. Associate an operation with a scope for a scoped registry. Useful when logging
  621. in to a private registry for the first time:
  622. `npm login --scope=@organization --registry=registry.organization.com`, which
  623. will cause `@organization` to be mapped to the registry for future installation
  624. of packages specified according to the pattern `@organization/package`.
  625. ### script-shell
  626. * Default: `null`
  627. * Type: path
  628. The shell to use for scripts run with the `npm run` command.
  629. ### scripts-prepend-node-path
  630. * Default: "warn-only"
  631. * Type: Boolean, `"auto"` or `"warn-only"`
  632. If set to `true`, add the directory in which the current `node` executable
  633. resides to the `PATH` environment variable when running scripts,
  634. even if that means that `npm` will invoke a different `node` executable than
  635. the one which it is running.
  636. If set to `false`, never modify `PATH` with that.
  637. If set to `"warn-only"`, never modify `PATH` but print a warning if `npm` thinks
  638. that you may want to run it with `true`, e.g. because the `node` executable
  639. in the `PATH` is not the one `npm` was invoked with.
  640. If set to `auto`, only add that directory to the `PATH` environment variable
  641. if the `node` executable with which `npm` was invoked and the one that is found
  642. first on the `PATH` are different.
  643. ### searchexclude
  644. * Default: ""
  645. * Type: String
  646. Space-separated options that limit the results from search.
  647. ### searchopts
  648. * Default: ""
  649. * Type: String
  650. Space-separated options that are always passed to search.
  651. ### searchlimit
  652. * Default: 20
  653. * Type: Number
  654. Number of items to limit search results to. Will not apply at all to legacy
  655. searches.
  656. ### searchstaleness
  657. * Default: 900 (15 minutes)
  658. * Type: Number
  659. The age of the cache, in seconds, before another registry request is made if
  660. using legacy search endpoint.
  661. ### send-metrics
  662. * Default: false
  663. * Type: Boolean
  664. If true, success/failure metrics will be reported to the registry stored in
  665. `metrics-registry`. These requests contain the number of successful and
  666. failing runs of the npm CLI and the time period overwhich those counts were
  667. gathered. No identifying information is included in these requests.
  668. ### shell
  669. * Default: SHELL environment variable, or "bash" on Posix, or "cmd" on
  670. Windows
  671. * Type: path
  672. The shell to run for the `npm explore` command.
  673. ### shrinkwrap
  674. * Default: true
  675. * Type: Boolean
  676. If set to false, then ignore `npm-shrinkwrap.json` files when installing. This
  677. will also prevent _writing_ `npm-shrinkwrap.json` if `save` is true.
  678. This option is an alias for `--package-lock`.
  679. ### sign-git-commit
  680. * Default: false
  681. * Type: Boolean
  682. If set to true, then the `npm version` command will commit the new package
  683. version using `-S` to add a signature.
  684. Note that git requires you to have set up GPG keys in your git configs
  685. for this to work properly.
  686. ### sign-git-tag
  687. * Default: false
  688. * Type: Boolean
  689. If set to true, then the `npm version` command will tag the version
  690. using `-s` to add a signature.
  691. Note that git requires you to have set up GPG keys in your git configs
  692. for this to work properly.
  693. ### sso-poll-frequency
  694. * Default: 500
  695. * Type: Number
  696. When used with SSO-enabled `auth-type`s, configures how regularly the registry
  697. should be polled while the user is completing authentication.
  698. ### sso-type
  699. * Default: 'oauth'
  700. * Type: 'oauth', 'saml', or null
  701. If `--auth-type=sso`, the type of SSO type to use.
  702. ### strict-ssl
  703. * Default: true
  704. * Type: Boolean
  705. Whether or not to do SSL key validation when making requests to the
  706. registry via https.
  707. See also the `ca` config.
  708. ### tag
  709. * Default: latest
  710. * Type: String
  711. If you ask npm to install a package and don't tell it a specific version, then
  712. it will install the specified tag.
  713. Also the tag that is added to the package@version specified by the `npm
  714. tag` command, if no explicit tag is given.
  715. ### tag-version-prefix
  716. * Default: `"v"`
  717. * Type: String
  718. If set, alters the prefix used when tagging a new version when performing a
  719. version increment using `npm-version`. To remove the prefix altogether, set it
  720. to the empty string: `""`.
  721. Because other tools may rely on the convention that npm version tags look like
  722. `v1.0.0`, _only use this property if it is absolutely necessary_. In
  723. particular, use care when overriding this setting for public packages.
  724. ### timing
  725. * Default: `false`
  726. * Type: Boolean
  727. If true, writes an `npm-debug` log to `_logs` and timing information to
  728. `_timing.json`, both in your cache. `_timing.json` is a newline delimited
  729. list of JSON objects. You can quickly view it with this
  730. [json](https://www.npmjs.com/package/json) command line:
  731. `json -g < ~/.npm/_timing.json`.
  732. ### tmp
  733. * Default: TMPDIR environment variable, or "/tmp"
  734. * Type: path
  735. Where to store temporary files and folders. All temp files are deleted
  736. on success, but left behind on failure for forensic purposes.
  737. ### unicode
  738. * Default: false on windows, true on mac/unix systems with a unicode locale
  739. * Type: Boolean
  740. When set to true, npm uses unicode characters in the tree output. When
  741. false, it uses ascii characters to draw trees.
  742. ### unsafe-perm
  743. * Default: false if running as root, true otherwise
  744. * Type: Boolean
  745. Set to true to suppress the UID/GID switching when running package
  746. scripts. If set explicitly to false, then installing as a non-root user
  747. will fail.
  748. ### update-notifier
  749. * Default: true
  750. * Type: Boolean
  751. Set to false to suppress the update notification when using an older
  752. version of npm than the latest.
  753. ### usage
  754. * Default: false
  755. * Type: Boolean
  756. Set to show short usage output (like the -H output)
  757. instead of complete help when doing `npm-help(1)`.
  758. ### user
  759. * Default: "nobody"
  760. * Type: String or Number
  761. The UID to set to when running package scripts as root.
  762. ### userconfig
  763. * Default: ~/.npmrc
  764. * Type: path
  765. The location of user-level configuration settings.
  766. ### umask
  767. * Default: 022
  768. * Type: Octal numeric string in range 0000..0777 (0..511)
  769. The "umask" value to use when setting the file creation mode on files
  770. and folders.
  771. Folders and executables are given a mode which is `0777` masked against
  772. this value. Other files are given a mode which is `0666` masked against
  773. this value. Thus, the defaults are `0755` and `0644` respectively.
  774. ### user-agent
  775. * Default: node/{process.version} {process.platform} {process.arch}
  776. * Type: String
  777. Sets a User-Agent to the request header
  778. ### version
  779. * Default: false
  780. * Type: boolean
  781. If true, output the npm version and exit successfully.
  782. Only relevant when specified explicitly on the command line.
  783. ### versions
  784. * Default: false
  785. * Type: boolean
  786. If true, output the npm version as well as node's `process.versions` map, and
  787. exit successfully.
  788. Only relevant when specified explicitly on the command line.
  789. ### viewer
  790. * Default: "man" on Posix, "browser" on Windows
  791. * Type: path
  792. The program to use to view help content.
  793. Set to `"browser"` to view html help content in the default web browser.
  794. ## SEE ALSO
  795. * npm-config(1)
  796. * npmrc(5)
  797. * npm-scripts(7)
  798. * npm-folders(5)
  799. * npm(1)