Open manoraj opened 1 month ago
It seems like you're proposing a cli
feature related to running executable scripts defined in the bin field of package.json
files, similar to how npm run
executes scripts defined in the scripts field.
is it ?
It seems like you're proposing a
cli
feature related to running executable scripts defined in the bin field ofpackage.json
files, similar to hownpm run
executes scripts defined in the scripts field. is it ?
@KunalKumar-1 Yes. Node already has node --run
. Ask is to extend it to bin scripts as well.
Since we've added --run
supporting bin
also seems to make sense. Perhaps node --bin foo
would work?
Since we've added --run supporting bin also seems to make sense. Perhaps node --bin foo would work?
That's one option. The other option is to extend checking both scripts and bin fields in package.json with --run
. Just like how yarn <script>
does.
What is the problem this feature will solve?
This feature will help run the
bin
scripts in package.json, similar to runningscripts
. During local development, it's very common to run the bin scripts, and it would be great if the node task runner supported it.What is the feature you are proposing to solve the problem?
Add
node --run --bin
ornode --run-bin
. This will run the bin script similar to whatnode --run
does, except it looks for abin
field.I know node task runner is not a replacement for something like
yarn
, but, another option is to support both the fields (scripts
andbin
) withnode --run,
similar to whatyarn
does.What alternatives have you considered?
No response