zkat / npx

execute npm package binaries (moved)

Home Page:https://github.com/npm/npx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Support "scripts" in package.json

kkweon opened this issue · comments

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

  • One word longer, but if you type 1000 times, it's 1,000 more words
  • I want to be able to use npx for consistency

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

Ref #107 and #64.

Damn sorry about that. Didnt see the #64.