diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-05-28 18:09:43 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-05-28 18:48:39 -0400 |
| commit | 8cba5a2e30a09d3015ea174168800925cfaa461f (patch) | |
| tree | a96d26f9d904e436ed0334a83849be7d2c2bca32 /.sqlx/query-684b4bef3e553b8ccfa20d8de3272e44b1c15ed75977ce24f25fd62042fb20fb.json | |
| parent | a94e94652748e654c5c945e2e822b56ebf394b76 (diff) | |
Put `npm`'s bin directory on `$PATH` when using direnv.
This allows developers (hi) to run tools installed via NPM without having to run `npm exec` or `npx` to do so. It's mostly for ergonomics, but it's nice to be able to run `vite build` and have it "just" work.
The "canonical" invocations, used in tool scripts or when `build.rs` has to run Node, uses `npx`. More generally, we don't assume direnv, even though the source tree provides it.
There is no corresponding `layout rust` in `direnv`, but the same niche is fulfilled by the `PATH_add` targeting Cargo's output directory. I also considered using `PATH_add` instead of `layout` for this, as they do the same thing (at least as of this version of `direnv`), but I think it's probably more appropriate to use the parts of direnv that express the broader intention to use Node's tools than to manually implement them myself.
If you're using `direnv` across this change, you'll need to re-run `direnv allow`.
Diffstat (limited to '.sqlx/query-684b4bef3e553b8ccfa20d8de3272e44b1c15ed75977ce24f25fd62042fb20fb.json')
0 files changed, 0 insertions, 0 deletions
