Quiet output on npm-script hook

335 views Asked by At

Every time I bump the version of my package, I want to write that version in a file for building purposes.

I made a hook on postversion so I can execute my write-version script every time the version is pumped (through npm version).

package.json

"scripts": {
  "postversion": "node write-version && git push && git push --tags"
}

This works, but I would like to get hide the following output it generates:

CLI

> npm version patch

> [email protected] postversion C:\git\my-package-name
> node write-version && git push && git push --tags

Is there a way to do this?

0

There are 0 answers