1.0.0 • Published 8 years ago
get-bin v1.0.0
get-bin
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
1.0.0
8 years ago