resolve-as-bin
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Resolve a local npm package as the absolute binary path

Install

$ npm install --save resolve-as-bin

Usage

import resolve from 'resolve-as-bin';

// npm installed package
console.log(resolve('rimraf')); // "/absolute/path/to/node_modules/.bin/rimraf(.cmd)"

// relative or absolute paths are supported
console.log(resolve('./some-binary')); // "/absolute/path/to/some-binary(.cmd)"
console.log(resolve('/absolute/path/another-binary')); // "/absolute/path/another-binary(.cmd)"

Package Sidebar

Install

npm i resolve-as-bin

Weekly Downloads

1,111

Version

2.1.0

License

MIT

Unpacked Size

3.4 kB

Total Files

5

Last publish

Collaborators

  • saltyshiomix