Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-05-20 00:16:17 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-05-20 00:16:17 +0300
commitd3526ceb09a0c29fdb7d4124536ae09057d033e7 (patch)
treed2d0c3cbe3581ce57f766bb496ce253dd114938c /doc
parentf87cde5234a760d3e515ffdaacaed6f5b71dbf44 (diff)
doc: use monospace highlighting consistently
Diffstat (limited to 'doc')
-rw-r--r--doc/cli/npm-shrinkwrap.md26
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/cli/npm-shrinkwrap.md b/doc/cli/npm-shrinkwrap.md
index 68ff2d6c0..ca9cb257b 100644
--- a/doc/cli/npm-shrinkwrap.md
+++ b/doc/cli/npm-shrinkwrap.md
@@ -13,14 +13,14 @@ used when your package is installed. The `package.json` file is still
required if you want to use `npm install`.
By default, `npm install` recursively installs the target's
-dependencies (as specified in package.json), choosing the latest
+dependencies (as specified in `package.json`), choosing the latest
available version that satisfies the dependency's semver pattern. In
some situations, particularly when shipping software where each change
is tightly managed, it's desirable to fully specify each version of
each dependency recursively so that subsequent builds and deploys do
not inadvertently pick up newer versions of a dependency that satisfy
the semver pattern. Specifying specific semver patterns in each
-dependency's package.json would facilitate this, but that's not always
+dependency's `package.json` would facilitate this, but that's not always
possible or desirable, as when another author owns the npm package.
It's also possible to check dependencies directly into source control,
but that may be undesirable for other reasons.
@@ -78,7 +78,7 @@ In this case, A's author can run
npm shrinkwrap
-This generates npm-shrinkwrap.json, which will look something like this:
+This generates `npm-shrinkwrap.json`, which will look something like this:
{
"name": "A",
@@ -97,12 +97,12 @@ This generates npm-shrinkwrap.json, which will look something like this:
The shrinkwrap command has locked down the dependencies based on
what's currently installed in node_modules. When `npm install`
-installs a package with an npm-shrinkwrap.json file in the package
-root, the shrinkwrap file (rather than package.json files) completely
+installs a package with an `npm-shrinkwrap.json` in the package
+root, the shrinkwrap file (rather than `package.json` files) completely
drives the installation of that package and all of its dependencies
(recursively). So now the author publishes A@0.1.0, and subsequent
installs of this package will use B@0.0.1 and C@0.0.1, regardless the
-dependencies and versions listed in A's, B's, and C's package.json
+dependencies and versions listed in A's, B's, and C's `package.json`
files.
@@ -110,7 +110,7 @@ files.
Using a shrinkwrapped package is no different than using any other
package: you can `npm install` it by hand, or add a dependency to your
-package.json file and `npm install` it.
+`package.json` file and `npm install` it.
### Building shrinkwrapped packages
@@ -119,7 +119,7 @@ To shrinkwrap an existing package:
1. Run `npm install` in the package root to install the current
versions of all dependencies.
2. Validate that the package works as expected with these versions.
-3. Run `npm shrinkwrap`, add npm-shrinkwrap.json to git, and publish
+3. Run `npm shrinkwrap`, add `npm-shrinkwrap.json` to git, and publish
your package.
To add or update a dependency in a shrinkwrapped package:
@@ -127,13 +127,13 @@ To add or update a dependency in a shrinkwrapped package:
1. Run `npm install` in the package root to install the current
versions of all dependencies.
2. Add or update dependencies. `npm install` each new or updated
- package individually and then update package.json. Note that they
+ package individually and then update `package.json`. Note that they
must be explicitly named in order to be installed: running `npm
install` with no arguments will merely reproduce the existing
shrinkwrap.
3. Validate that the package works as expected with the new
dependencies.
-4. Run `npm shrinkwrap`, commit the new npm-shrinkwrap.json, and
+4. Run `npm shrinkwrap`, commit the new `npm-shrinkwrap.json`, and
publish your package.
You can use npm-outdated(1) to view dependencies with newer versions
@@ -141,12 +141,12 @@ available.
### Other Notes
-A shrinkwrap file must be consistent with the package's package.json
+A shrinkwrap file must be consistent with the package's `package.json`
file. `npm shrinkwrap` will fail if required dependencies are not
already installed, since that would result in a shrinkwrap that
wouldn't actually work. Similarly, the command will fail if there are
-extraneous packages (not referenced by package.json), since that would
-indicate that package.json is not correct.
+extraneous packages (not referenced by `package.json`), since that would
+indicate that `package.json` is not correct.
Since `npm shrinkwrap` is intended to lock down your dependencies for
production use, `devDependencies` will not be included unless you