Open fabiospampinato opened 1 year ago
While I'd love this, I'm not sure how it would work, since npm run
primarily works by setting up the PATH to include node_modules/.bin
. I suppose npm install
(only the toplevel one) could add its own bins to node_modules/.bin
, and that would Just Work?
Motivation ("The Why")
The motivations behind this is that it seems natural to me, even if a bit niche, and scripts defined like this are the cleanest possibly way to write them that I can think of:
Notice how the
something
script insidepkg
references thepkg
bin, i.e. itself.Example
See above.
How
Current Behaviour
Currently running an
npm run something
leads to an error saying thatpkg
has not been found.Desired Behaviour
npm run
should take into consideration the binaries defined by the current package, and consider them as available binaries too.References