get-bin
Get the name of the executable.
Last updated 4 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install get-bin 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

1 Versions

  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |