Package binaries
(package.json
's bin
field)
are installed in the node_modules/.bin
directory by npm install
.
On Unix those are symlinks pointing to the executable files. They can be executed directly inside a terminal.
On Windows, each package binary creates instead three files for the same purpose:
- a Windows batch file ending with
.cmd
executed when usingcmd.exe
. - a Bash file with no file extension executed when using Cygwin or MSYS2.
- a Powershell file ending with
.ps1
executed when using Powershell.
To fire local binaries on any OS: use npx
(in
the shell) or execa
(in JavaScript).
Next (💻 Environment variables)
Previous (💻 File execution)
Top