Skip to content

Commit 752652e

Browse files
authored
docs(package-lock): Added package-lock resolved example (#250)
docs(package-lock): Added package-lock resolved ex Added a concrete example on how the url from the resolved field of a package-lock.json file will be used along with the configured registry value in order to build the URL for that package.
1 parent b4ff454 commit 752652e

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

doc/spec/package-lock.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ this resource.
7575
URL. If the tarball URL isn't on the same server as the registry URL then
7676
this is a complete URL.
7777

78+
eg, Given a `package-lock.json` file containing:
79+
80+
```
81+
"resolved": "https://registry.npmjs.org/example/-/example-1.0.0.tgz"
82+
```
83+
84+
and a registry source configuring a custom value:
85+
86+
```
87+
npm install --registry https://registry.example.com
88+
```
89+
90+
the package will be fetched from the custom-defined registry:
91+
92+
```
93+
https://registry.example.com/example/-/example-1.0.0.tgz
94+
```
95+
7896
#### link *(new)*
7997

8098
If this module was symlinked in development but had semver in the

0 commit comments

Comments
 (0)