M-Zuber / npm-watch

run npm scripts when files change
MIT License
323 stars 38 forks source link

Pass arguments to npm script? #37

Open stevenvachon opened 7 years ago

stevenvachon commented 7 years ago
"scripts": {
  "build": "node build.js",
  "watch": "npm-watch build"
},
"watch": {
  "build": "*.js"
}
npm run watch -- --param=value

should effectively do:

npm run build --param=value
stevenvachon commented 7 years ago

@M-Zuber hello?

M-Zuber commented 7 years ago

Sorry been a bit behind in getting to issues here... 😢 Is this a feature request, or something you expected to work but doesn't?

stevenvachon commented 7 years ago

Feature request.

stevenvachon commented 7 years ago

We can use npx instead of npm run, which will be implemented into a future version of npm as npm exec.

M-Zuber commented 7 years ago

We can use npx instead of npm run, which will be implemented into a future version of npm as npm exec.

Sounds interesting, would have to read up more on it

M-Zuber commented 5 years ago

So I looked into this some, and the current set up will not allow for this without some uncomfortable twisting. Leaving this open, but it is further down on the roadmap