What if we allowed to omit "run" in "npm run" if there are no name clashes?

(Roy Revelt) #1

If npm x keyword is unrecognised, check scripts with the x name, and if found, run that script. If I run things like that and already have script named x, I do intend that, both throwing errors and insisting on typing run are tedious. What do you think?

For example, instead of “npm run noodles”, allow “npm noodles”

Like yarn does already…

(John Gee) #2

I see a problem with this, although it is appealing.

npm already has a LOT of commands and may add more in the future. Adding a “foo” command to npm would break everyone who was relying on “npm foo” to be same as “npm run foo”.