Skip to content

dominique-mueller/exec-bin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

86a075d · Apr 13, 2021

History

6 Commits
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021
Apr 13, 2021

Repository files navigation

exec-bin

Run any binary files / executables within your npm scripts.



What it does

Running binary files / executables within npm scripts works if it's either part of an installed package (node_modules/.bin) or globally installed. A binary that exists someplace else, e.g. in the project root, cannot easily be executed.

exec-bin is here to help! It's a (very!) small Node.js script that you can use to run binary files / executables, with all parameters being forwarded automatically. Fantastic!




How to install

You can get the exec-bin via npm by adding it as a new devDependency to your package.json file and running npm install. Alternatively, run the following command:

npm install exec-bin --save-dev

Requirements

  • exec-bin requires NodeJS 12 (or higher) to be installed




How to use

Use exec-bin within your package.json scripts. For example:

{
  "scripts": {
    "build": "exec-bin path/to/my/binary --first-parameter=foobar --second-boolean-parameter"
  }
}