resolve-bin
v1.0.1
Published
Resolves the full path to the bin file of a given package by inspecting the "bin" field in its package.json.
Downloads
232,992
Readme
resolve-bin
Resolves the full path to the bin file of a given package by inspecting the "bin"
field in its package.json.
var resolveBin = require('resolve-bin');
// package.json: "bin": "bin/tap.js"
resolveBin('tap', function (err, bin) {
if (err) return console.error(err);
console.log(bin);
});
// => [..]/resolve-bin/node_modules/tap/bin/tap.js
Installation
npm install resolve-bin
API
generated with docme
License
MIT