diff options
author | Francis Gulotta <wizard@roborooter.com> | 2018-08-21 01:28:15 +0300 |
---|---|---|
committer | Kat Marchán <kzm@zkat.tech> | 2018-08-21 02:17:49 +0300 |
commit | de956405d8b72354f98579d00c6dd30ac3b9bddf (patch) | |
tree | 64abcc72c5ed8b545873548c8b186d9d460855f3 /doc | |
parent | 08ecde2928f8c89a2fdaa800ae845103750b9327 (diff) |
docs: add --dry-run to install and pack (#41)
PR-URL: https://github.com/npm/cli/pull/41
Credit: @reconbot
Reviewed-By: @zkat
Diffstat (limited to 'doc')
-rw-r--r-- | doc/cli/npm-pack.md | 5 | ||||
-rw-r--r-- | doc/cli/npm-publish.md | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/doc/cli/npm-pack.md b/doc/cli/npm-pack.md index f44f5e362..807663ac2 100644 --- a/doc/cli/npm-pack.md +++ b/doc/cli/npm-pack.md @@ -3,7 +3,7 @@ npm-pack(1) -- Create a tarball from a package ## SYNOPSIS - npm pack [[<@scope>/]<pkg>...] + npm pack [[<@scope>/]<pkg>...] [--dry-run] ## DESCRIPTION @@ -18,6 +18,9 @@ overwritten the second time. If no arguments are supplied, then npm packs the current package folder. +The `--dry-run` argument will do everything that pack usually does without +actually packing anything. Reports on what would have gone into the tarball. + ## SEE ALSO * npm-cache(1) diff --git a/doc/cli/npm-publish.md b/doc/cli/npm-publish.md index 7e173ec00..a317ff45e 100644 --- a/doc/cli/npm-publish.md +++ b/doc/cli/npm-publish.md @@ -4,7 +4,7 @@ npm-publish(1) -- Publish a package ## SYNOPSIS - npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] + npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode] [--dry-run] Publishes '.' if no argument supplied Sets tag 'latest' if no --tag specified @@ -46,6 +46,10 @@ specifying a different default registry or using a `npm-scope(7)` in the name then you can provide a code from your authenticator with this. If you don't include this and you're running from a TTY then you'll be prompted. +* `[--dry-run]` + Does everything publish would do except actually publishing to the registry. + Reports the details of what would have been published. + Fails if the package name and version combination already exists in the specified registry. @@ -57,9 +61,8 @@ As of `npm@5`, both a sha1sum and an integrity field with a sha512sum of the tarball will be submitted to the registry during publication. Subsequent installs will use the strongest supported algorithm to verify downloads. -For a "dry run" that does everything except actually publishing to the -registry, see `npm-pack(1)`, which figures out the files to be included and -packs them into a tarball to be uploaded to the registry. +Similar to `--dry-run` see `npm-pack(1)`, which figures out the files to be +included and packs them into a tarball to be uploaded to the registry. ## SEE ALSO |