-
Notifications
You must be signed in to change notification settings - Fork 19
Description
In
website/subdomains/docs/_guide/understanding.md
Lines 79 to 97 in b033878
| ### Using project tools | |
| The `node` and package manager executables aren't the only smart tools in your toolchain: the package binaries in your toolchain are also aware of your current directory, and respect the configuration of the project you're in. | |
| For example, installing the Typescript package will add the compiler executable—`tsc`— to your toolchain: | |
| ```sh | |
| npm install --global typescript | |
| ``` | |
| Depending on the project you're in, this executable will switch to the project's chosen version of TypeScript: | |
| ```sh | |
| cd /path/to/project-using-typescript-{{ site.data.versions.typescript.recent.full }} | |
| tsc --version # {{ site.data.versions.typescript.recent.full }} | |
| cd /path/to/project-using-typescript-{{ site.data.versions.typescript.stable.full }} | |
| tsc --version # {{ site.data.versions.typescript.stable.full }} | |
| ``` |
First, I'd like to ask if my understanding is correct but this section is implicitly saying that on both directories, despite having a global tsc version by npm install --global typescript, inside each directories previously was executed the commands:
$ cd /path/to/project-using-typescript-{{ site.data.versions.typescript.recent.full }}
$ volta pin typescript@{{ site.data.versions.typescript.recent.full }}
$ cd /path/to/project-using-typescript-{{ site.data.versions.typescript.stable.full }}
$ volta pin typescript@{{ site.data.versions.typescript.stable.full }}that's the reason why volta is able to recognize the right tsc version to use on each dir (despite if not explictly declare, could default to global tsc installed via global default npm, bundled with the default node managed / installed / detected via volta), right?
Since I'm not familiar with the node ecosystem and didn't test this scenario yet, I'd prefer to check if my understanding (about shims) is correct, and in case yes, I think there is an opportunity to improve the docs and make it more explicit instead of assume it is self-explanatory, without thinking it could be too verbose.
pd: probably this is more a suggestion than an issue
pd2: if this is not the right place, I'm happy to close this.