Skip to content

Commit

Permalink
Fallback to globally installed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ca-pli committed Oct 13, 2018
1 parent 1f3267a commit c124f9c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This is similar to [npx](https://www.npmjs.com/package/npx) with following diffe
- ~/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 executables are not found.

Expand Down Expand Up @@ -44,3 +45,6 @@ npex tsc --listFiles
npex jest
npex jest --help
```

[1]: https://badge.fury.io/js/npex.svg
[2]: https://badge.fury.io/js/npex
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function exec({ args, verbose }) {
}

if (pwd == process.env.HOME) {
console.error(`Error: ${args[0]}: command not found.`);
return 1;
output = shell.exec(`${args.join(' ')}`);
return output.code;
}

pwd = path.resolve(pwd, '../');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npex",
"version": "1.0.1",
"version": "1.0.2",
"description": "Find npm package executables in node_modules/.bin recursively, and execute them.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit c124f9c

Please sign in to comment.