-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: package aliases #485
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we determine whether or not removing the line breaks will change the output we generate for the man
(ie. manual
) pages?
@@ -63,8 +64,7 @@ after packing it up into a tarball (b). | |||
With the `--production` flag (or when the `NODE_ENV` environment variable | |||
is set to `production`), npm will not install modules listed in | |||
`devDependencies`. To install all modules listed in both `dependencies` | |||
and `devDependencies` when `NODE_ENV` environment variable is set to `production`, | |||
you can use `--production=false`. | |||
and `devDependencies` when `NODE_ENV` environment variable is set to `production`, you can use `--production=false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claudiahdz I think the reason there were line breaks here was to keep the text column count short in a shell output... not sure if removing them will effect that negatively so that command line docs would span the length of the terminal 🤔
@@ -113,12 +109,22 @@ after packing it up into a tarball (b). | |||
|
|||
npm install sax | |||
|
|||
* `npm install <alias>@npm:<name>`: | |||
|
|||
Install a package under a custom alias. Allows multiple versions of a same-name package side-by-side, more convenient import names for packages with otherwise long ones and using git forks replacements or forked npm packages as replacements. Aliasing works only on your project and does not rename packages in transitive dependencies. Aliases should follow the naming conventions stated in [`validate-npm-package-name`](https://www.npmjs.com/package/validate-npm-package-name#naming-rules). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM ✅👍
4613d60
to
41feb13
Compare
@@ -113,6 +114,19 @@ after packing it up into a tarball (b). | |||
|
|||
npm install sax | |||
|
|||
* `npm install <alias>@npm:<name>`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with --save
, would this install using the alias notation into package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for example doing npm install jquery1@npm:jquery@1
will look like this on package.json:
"dependencies": {
"jquery1": "npm:jquery@^1.12.4"
}
You can also use the alias for npm related tasks, ex: npm uninstall jquery1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Should the docs be explicit about that?
|
7ba97b0
to
7b17efb
Compare
7b17efb
to
90805b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a first pass now ✅👍
Adds docs for package aliases.