Skip to content

lonewolfyx/local-pkg-bin

Repository files navigation

local-pkg-bin

Easily retrieve the absolute paths of executable binaries provided by your project's local npm packages.

Install

pnpm add local-pkg-bin

Usage

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 {}.

License

MIT · lonewolfyx

About

Easily retrieve the absolute paths of executable binaries provided by your project's local npm packages

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors