cli
cli copied to clipboard
[BUG] Misleading documentation on package.json:bin
What / Why
Documentation states the following:
To use this, supply a
bin
field in your package.json which is a map of command name to local file name. When this package is installed globally, that file will be linked where global bins go so it is available to run by name. (quote from the documentation)
Unfortunately, this is not true for Windows, where it doesn't use symbolic links, but rather a custom script generated by the cmd-shim
package.
When
- running
npm install
Where
- on the
package.json:bin
How
Steps to Reproduce
main.js
const [, file, ...parameters] = process.argv;
console.log(require('path').basename(file));
package.json
{
"bin": {
"one": "main.js",
"two": "main.js"
}
···
}
Current Behavior
Running one
will print main.js
on Windows and one
on every other platform.
Expected Behavior
Running one
should print one
on every platform.
@0x2b3bfa0 this particular documentation is actually tracked in the CLI repository and checked in to this repository via automation. I'm going to transfer this issue to the appropriate repository
Is this still an issue? Can I pick this up?
@darcyclarke Hey , I want to contribute to this issue , can you share me the preferable resources which can help me.
@darcyclarke I would like to work on this issue. Thank you
I searched about this issue and I found a useful article to understand the context.
I am not asking to work on this issue because I am a macOS user.