1.0.0 • Published 8 years ago

get-bin v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

get-bin NPM version NPM downloads Build Status

Get the name of the executable.

Install

$ npm install --save get-bin

Usage

const getBin = require('get-bin')

getBin().then(bin => {
  console.log(bin)
  //=> ['cli-name']
})

// if no `bin` set in `package.json`
getBin().then()
//=> null

// for a specific path
getBin({cwd: '/path/to/somewhere'}).then()

// in sync mode
getBin.sync()

API

getBin(options)

options

cwd

Type: string
Default: Path.dirname(module.parent.filename)

The path a package.json relative to.

.sync

Sync mode.

License

MIT © EGOIST