Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with binary #46

Closed
dlebedynskyi opened this issue Nov 28, 2016 · 3 comments
Closed

problem with binary #46

dlebedynskyi opened this issue Nov 28, 2016 · 3 comments

Comments

@dlebedynskyi
Copy link

dlebedynskyi commented Nov 28, 2016

due to this
https://github.com/leo/args/blob/master/src/index.js#L312

for case when you have your command in folder like

script/
 - test.js
- test-hello.js

with

//test 
args.command('hello', 'say hello');

it will fail to find command with test.js-hello.

  1. I'd expect to handle extension.
  2. it also seem to look for test-hello in root folder instead of scripts.
@leo
Copy link
Owner

leo commented Jan 4, 2017

Have you added the binaries to the bin property in your package.json? Please post it here.

@leo leo closed this as completed Jan 8, 2017
@ntwcklng
Copy link
Collaborator

ntwcklng commented Mar 6, 2017

@dlebedynskyi Try this:

package.json:

  "bin": {
    "test": "script/test.js",
    "test-hello": "script/test-hello.js"
  }

and the most important part is running npm link, so the binaries test and test-hello getting symlinked to /usr/local/bin/. You only have to do this while developing. When a user installs your npm package, the two binaries getting added to the users bin folder by default.

@dlebedynskyi
Copy link
Author

@ntwcklng thanks. this actually helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants