resolve-as-bin

Resolve a local npm package as binary path

MIT 8 个版本
安装
npm install resolve-as-bin
yarn add resolve-as-bin
pnpm add resolve-as-bin
bun add resolve-as-bin
README

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)"
版本列表
2.1.0 2019-07-16
2.0.0 2019-07-16
1.4.0 2019-07-16
1.3.0 2018-07-30
1.2.0 2018-07-27
1.1.0 2018-07-27
1.0.1 2018-07-26
1.0.0 2018-07-26