local-pkg-bin
v0.0.1
Published
Easily retrieve the absolute paths of executable binaries provided by your project's local npm packages
Readme
local-pkg-bin
Easily retrieve the absolute paths of executable binaries provided by your project's local npm packages.
Install
pnpm add local-pkg-binUsage
const bins = await resolvePackageBin('my-tools')
// { 'my-tool': '/path/to/bin/tool.js', 'my-helper': '/path/to/bin/helper.js' }If the package does not exist or has no bin field, it returns an empty object {}.
