Skip to content

Commit

Permalink
fix(lib/cli.coffee,package.json): Normalize the "bin" field in "packa…
Browse files Browse the repository at this point in the history
…ge.json"

Field is treated differently after installation. Originally given as a string, the install converts
it to a map. Changed to use map with named field. Updated CLI to reference the named field.

Fixes #242
  • Loading branch information
plroebuck committed Jun 4, 2018
1 parent ee3ca0b commit 097329a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cli.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parseArgs = (argv) ->
'use strict'
allOptions = _.assign {}, abaoOptions, mochaOptions
mochaOptionNames = Object.keys mochaOptions
prog = path.basename pkg.bin
prog = path.basename pkg.bin.abao
return yargs(argv)
.usage("Usage:\n #{prog} </path/to/raml> [OPTIONS]" +
"\n\nExample:\n #{prog} api.raml --server http://api.example.com")
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "abao",
"version": "0.6.0",
"description": "RAML testing tool",
"bin": "bin/abao",
"bin": {
"abao": "bin/abao"
},
"main": "lib/index.js",
"scripts": {
"git-cz": "git-cz",
Expand Down

0 comments on commit 097329a

Please sign in to comment.