1.0.5 • Published 5 years ago

npex v1.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

npex

Find npm package executable in node_modules/.bin recursively, and execute the first occurrence found.

NPM version

Descriptions

This is similar to npx with following differences:

  1. npex tries to find executable in node_modules/.bin recursively until the first occurrence found (similar to the Node.js module resolution mechanism). E.g., npex jest will search following paths:

    • ~/my/git/engineforce/npex/node_modules/.bin/jest
    • ~/my/git/engineforce/node_modules/.bin/jest
    • ~/my/git/node_modules/.bin/jest
    • ~/my/node_modules/.bin/jest
    • ~/node_modules/.bin/jest
    • (globally installed jest)
  2. npex will not install anything if the executable is not found.

This extremely useful for monorepo, where your executables are hoisted to the monorepo root, but you want to execute them from sub-repos' location.

Install with npm

npm install -g npex

Usages

npex [--verbose] <command> [<args>...]

Examples

npex lerna ls
npex --verbose lerna ls

npex tsc
npex tsc --listFiles

npex jest
npex jest --help
npex jest --watch

History

  • 1.0.5 - Supports commands with user input such as jest --watch
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago