npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

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

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…

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”.