@@ -16,6 +16,7 @@ npm install [<@scope>/]<name>
1616npm install [< @scope> /]< name> @< tag>
1717npm install [< @scope> /]< name> @< version>
1818npm install [< @scope> /]< name> @< version range>
19+ npm install < alias> @npm:< name>
1920npm install < git-host> :< git-user> /< repo-name>
2021npm install < git repo url>
2122npm install < tarball file>
@@ -113,6 +114,24 @@ after packing it up into a tarball (b).
113114
114115 npm install sax
115116
117+ * ` npm install <alias>@npm:<name> ` :
118+
119+ Install a package under a custom alias. Allows multiple versions of
120+ a same-name package side-by-side, more convenient import names for
121+ packages with otherwise long ones and using git forks replacements
122+ or forked npm packages as replacements. Aliasing works only on your
123+ project and does not rename packages in transitive dependencies.
124+ Aliases should follow the naming conventions stated in
125+ [ ` validate-npm-package-name ` ] ( https://www.npmjs.com/package/validate-npm-package-name#naming-rules ) .
126+
127+ Examples:
128+
129+ npm install my-react@npm:react
130+ npm install jquery2@npm:jquery@2
131+ npm install jquery3@npm:jquery@3
132+ npm install npa@npm:npm-package-arg
133+
134+
116135 ` npm install ` saves any specified packages into ` dependencies ` by default.
117136 Additionally, you can control where and how they get saved with some
118137 additional flags:
0 commit comments