bin-wrapper icon indicating copy to clipboard operation
bin-wrapper copied to clipboard

Simplify bin creation

Open sindresorhus opened this issue 10 years ago • 3 comments

Currently we manually have to create useless proxies like these: https://github.com/kevva/elm-platform-bin/tree/master/bin

The reason is that we have to define the path to the binary in package.json up front.

Another way we could do it is to instead have bin-wrapper copy/move the binary to a fixed path/name we define in package.json.

@kevva What do you think?

sindresorhus avatar Dec 15 '14 04:12 sindresorhus

So instead of defining .dest() it could check for bin in the package.json and use that path? Sounds good to me.

kevva avatar Dec 30 '14 08:12 kevva

Yup.

sindresorhus avatar Dec 30 '14 09:12 sindresorhus

It has to match the one defined in .use() though if you were to create multiple binaries like we do in elm-platform. In other words, the binary name must be the same as the bin in package.json.

kevva avatar Dec 30 '14 12:12 kevva