zkat / npx

execute npm package binaries (moved)
https://github.com/npm/npx
Other
2.63k stars 105 forks source link

Feature Request: Support "scripts" in package.json #189

Closed kkweon closed 6 years ago

kkweon commented 6 years ago

What I want

"scripts": {
  "build:app": "webpack -p",
  "clean": "rm -rf node_modules",
  "webpack": "webpack -p"
}

Instead of npm run clean, I wish I could run npx clean

In case of duplicates, "scripts" will always override.

Therefore,

npx webpack

will check if webpack is already registered in "scripts"

If so, it is same as

npm run webpack

which will run ./node_modules/.bin/webpack -p

What's wrong with npm run

yarn already supports this. I can just run yarn clean yarn build:app

Can we have this please? I'm even willing to send a PR if you agree. 🙏🙏🙏

legodude17 commented 6 years ago

Ref #107 and #64.

kkweon commented 6 years ago

Damn sorry about that. Didnt see the #64.