Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
doc: add note about node_modules/.bin
Browse files Browse the repository at this point in the history
  • Loading branch information
apaleslimghost authored and othiym23 committed Mar 5, 2015
1 parent 1226ca9 commit c9bd58d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/cli/npm-run-script.md
Expand Up @@ -29,6 +29,13 @@ environment variables that will be available to the script at runtime. If an
"env" command is defined in your package it will take precedence over the
built-in.

In addition to the shell's pre-existing `PATH`, `npm run` adds
`node_modules/.bin` to the `PATH` provided to scripts. Any binaries provided by
locally-installed dependencies can be used without the `node_modules/.bin`
prefix. For example, if there is a `devDependency` on `tap` in your package,
you should write `"scripts": {"test": "tap test/\*.js"}` instead of `"scripts":
{"test": "node_modules/.bin/tap test/\*.js"}` to run your tests.

## SEE ALSO

* npm-scripts(7)
Expand Down

1 comment on commit c9bd58d

@MylesBorins
Copy link

Choose a reason for hiding this comment

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

!!!

Please sign in to comment.