docs(readme): document npm scripts automation capabilities

This commit is contained in:
Stephan Bönnemann 2015-02-02 15:54:43 +01:00
parent a1c86fc0d0
commit a48b0c957d

View File

@ -13,14 +13,17 @@ npm i semantic-release
Run `semantic-release pre` right before `npm publish` and `semantic-release post` right after.
The post hook is automatable in `package.json` with a "postpublish" script:
For maximum comfort you can automate this inside your `package.json`:
```json
"scripts": {
"prepublish": "semantic-release pre"
"postpublish": "semantic-release post"
}
```
This is currently not possible for the "prepublish" hook. See [npm/npm#7118](https://github.com/npm/npm/issues/7118).
Note: Even though `semantic-release` works around a limitation in npm's "prepublish" hook using it prints an error that you can *safely ignore*.
See [npm/npm#7118](https://github.com/npm/npm/issues/7118).
MIT License
2015 Stephan Bönnemann