From a48b0c957d8d1b8ebc8b3f4fed4446cfa239e780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6nnemann?= Date: Mon, 2 Feb 2015 15:54:43 +0100 Subject: [PATCH] docs(readme): document npm scripts automation capabilities --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5393d76..b911cb3b 100644 --- a/README.md +++ b/README.md @@ -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