get-package-bin
v0.1.0
Published
Get bin object from package.json
Downloads
2
Readme
get-package-bin
Get bin object from package.json
Installation
npm add get-package-bin
Usage
import { getPackageBin } from "get-package-bin";
const binObj = getPackageBin("./node_modules/typescript");
/*
{
tsc: "/PATH/TO/node_modules/typescript/bin/tsc",
tsserver: "/PATH/TO/node_modules/typescript/bin/tsserver"
}
*/
const bin = getPackageBin("./node_modules/typescript", "tsc");
// "/PATH/TO/node_modules/typescript/bin/tsc"