Skip to content

Commit e674987

Browse files
authoredAug 21, 2024
docs: update docs for npmrc and package-json (#7743)
Updating Docs for `npmrc` - Updated example config, instead of `prefix` which can not be changed for project, instead added `cache` which can be used for all three config types project, user and global `package-json` - added alias example in package-json docs, which can be used to define alias for a package closes: #6839 closes: #7188
1 parent 2404c7e commit e674987

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎docs/lib/content/configuring-npm/npmrc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Environment variables can be replaced using `${VARIABLE_NAME}`. For
2929
example:
3030

3131
```bash
32-
prefix = ${HOME}/.npm-packages
32+
cache = ${HOME}/.npm-packages
3333
```
3434

3535
Each of these files is loaded, and config options are resolved in priority

‎docs/lib/content/configuring-npm/package-json.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ See [semver](https://github.com/npm/node-semver#versions) for more details about
617617
* `tag` A specific version tagged and published as `tag` See [`npm
618618
dist-tag`](/commands/npm-dist-tag)
619619
* `path/path/path` See [Local Paths](#local-paths) below
620+
* `npm:@scope/pkg@version` Custom alias for a pacakge See [`package-spec`](/using-npm/package-spec#aliases)
620621

621622
For example, these are all valid:
622623

@@ -634,7 +635,8 @@ For example, these are all valid:
634635
"two": "2.x",
635636
"thr": "3.3.x",
636637
"lat": "latest",
637-
"dyl": "file:../dyl"
638+
"dyl": "file:../dyl",
639+
"kpg": "npm:pkg@1.0.0"
638640
}
639641
}
640642
```

0 commit comments

Comments
 (0)
Please sign in to comment.