2.0.2 • Published 8 years ago

bin-dir v2.0.2

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

bin-dir

Find the folder of a global command (installed via npm or not)

This is essentially a cross-os command for which + realpath + dirname plus special support for npm modules.

"Special support" means that bin-dir eslint won't open the directory .../eslint/bin but .../eslint

Install

npm install --global bin-dir 

CLI

$ bin-dir npm
/usr/local/lib/node_modules/npm

$ bin-dir wget
/usr/local/Cellar/wget/1.18/bin

$ bin-dir unicorns
// no output

API

const binDir = require('bin-dir');

binDir('xo') === '/usr/local/lib/node_modules/xo';
binDir('brew') === '/usr/local/bin';
binDir('unicorns') === undefined;

License

MIT © Federico Brigante

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago