Skip to content

Conversation

@kevva
Copy link
Owner

@kevva kevva commented Dec 30, 2014

Currently, this will probably break if .use() is something like path/bin, and if it differs from the binary name in package.json, e.g:

.use('asd.exe');
{
  "bin": {
    "asd": "bin/asd"
  }
}

Fixes #31.

@sindresorhus
Copy link
Contributor

ping @kevva

@kevva
Copy link
Owner Author

kevva commented Mar 14, 2015

Yeah, is module.parent.filename reliable to use to get caller modules package.json?

@sindresorhus
Copy link
Contributor

BinWrapper.prototype.pkg = function () {
delete require.cache[__filename];

var dir = path.dirname(module.parent.filename);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grushikhin
Copy link

Hello!
Is there any chance that you will merge this feature to the master?
I can help with resolving conflicts and updating branch.
I really want to have this feature :)

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

Successfully merging this pull request may close these issues.

Simplify bin creation

4 participants