Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

claudiahdz
Copy link
Contributor

Adds docs for package aliases.

@claudiahdz claudiahdz requested a review from a team as a code owner November 15, 2019 17:00
@claudiahdz claudiahdz added Release 6.x work is associated with a specific npm 6 release semver:patch semver patch level for changes labels Nov 15, 2019
Copy link
Contributor

@darcyclarke darcyclarke left a 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`.
Copy link
Contributor

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM ✅👍

@@ -113,6 +114,19 @@ after packing it up into a tarball (b).

npm install sax

* `npm install <alias>@npm:<name>`:
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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?

@npm-deploy-user
Copy link

npm-deploy-user commented Nov 15, 2019

angular-quickstart app-large app-medium ember-quickstart react-app
prev current status prev current status prev current status prev current status prev current status
initial install 38.4s 36.3s 39.6s 41.4s🛑 32.4s 33.4s🛑 24.9s 26.6s🛑 31.4s 33s🛑
repeat install 9s 9.2s🛑 8s 8.4s🛑 7.7s 8s🛑 6.9s 7s🛑 8.4s 9s🛑
with warm cache 28.9s 29.7s🛑 32.6s 33.3s🛑 27.3s 28.3s🛑 21.4s 23s🛑 29.4s 27.4s
with node_modules 8.7s 9.3s🛑 7.3s 9.5s🛑 8.3s 8.1s 7.4s 7.1s 8.3s 8.6s🛑
with lockfile 31.8s 28.3s 27.8s 31.8s🛑 26.5s 27.6s🛑 18.4s 20.5s🛑 24.4s 26.7s🛑
with warm cache and node_modules 9s 8.9s 8.3s 7.6s 7.7s 8.2s🛑 8.9s 7s 10.3s 8.5s
with warm cache and lockfile 25.2s 23.5s 24.9s 25.7s🛑 24s 24.9s🛑 15.2s 15.5s🛑 20.2s 21.1s🛑
with node_modules and lockfile 9.3s 9.8s🛑 8.6s 9.2s🛑 8.3s 8.5s🛑 7.5s 7.5s🛑 8.8s 9.1s🛑

@claudiahdz claudiahdz force-pushed the docs/package-aliases branch 2 times, most recently from 7ba97b0 to 7b17efb Compare November 15, 2019 18:52
Copy link
Contributor

@darcyclarke darcyclarke left a 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 ✅👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release 6.x work is associated with a specific npm 6 release semver:patch semver patch level for changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants