diff options
author | Gar <gar+gh@danger.computer> | 2022-02-17 21:40:44 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2022-02-17 21:40:44 +0300 |
commit | 1b7d7eff9bdd116088b0af7512512d2b28f0fe86 (patch) | |
tree | db4ecdcd502b253fcbbebe98e964c3c2c23f4fb7 /docs | |
parent | 9275856eb75e7c394a3c7617c2b495aba35ee2de (diff) | |
parent | 20c83fae76ff4a051e4f6542a328f1c00cf071bb (diff) |
Merge branch 'latest' into release-next
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/commands/npm-install.md | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/docs/content/commands/npm-install.md b/docs/content/commands/npm-install.md index 83b9af1e4..b4f8da837 100644 --- a/docs/content/commands/npm-install.md +++ b/docs/content/commands/npm-install.md @@ -78,11 +78,20 @@ into a tarball (b). * `npm install <folder>`: - Install the package in the directory as a symlink in the current - project. Its dependencies will be installed before it's linked. If - `<folder>` sits inside the root of your project, its dependencies may + If `<folder>` sits inside the root of your project, its dependencies will be installed and may be hoisted to the top-level `node_modules` as they would for other - types of dependencies. + types of dependencies. If `<folder>` sits outside the root of your project, + *npm will not install the package dependencies* in the directory `<folder>`, + but it will create a symlink to `<folder>`. + + > NOTE: If you want to install the content of a directory like a package from the registry instead of creating a link, you would need to use [`npm pack`](/commands/npm-pack) while in the `<folder>` directory, and then install the resulting tarball instead of the `<folder>` using `npm install <tarball file>` + + Example: + + ```bash + npm install ../../other-package + npm install ./sub-package + ``` * `npm install <tarball file>`: |