Skip to content

Use binary destination set in package.json#34

Open
kevva wants to merge 1 commit into
masterfrom
pkg
Open

Use binary destination set in package.json#34
kevva wants to merge 1 commit into
masterfrom
pkg

Conversation

@kevva

@kevva kevva commented Dec 30, 2014

Copy link
Copy Markdown
Owner

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
Copy Markdown
Contributor

ping @kevva

@kevva

kevva commented Mar 14, 2015

Copy link
Copy Markdown
Owner Author

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

@sindresorhus

Copy link
Copy Markdown
Contributor

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@grushikhin

Copy link
Copy Markdown

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

3 participants