From c1c37e7cb99a2b21ec02dbcf597b7d482022ace1 Mon Sep 17 00:00:00 2001 From: Avaq Date: Wed, 26 Oct 2016 17:36:12 +0200 Subject: [PATCH] Add detection of private packages and don't publish them to NPM Closes #28 --- README.md | 2 +- xyz | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cf18d96..e3967d7 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Several things will happen if one elects to continue: git commit --message 'Version 0.6.1' git tag --annotate 'v0.6.1' --message 'Version 0.6.1' git push origin 'refs/heads/master' 'refs/tags/v0.6.1' - npm publish + npm publish # Only for non-private packages. xyz accepts several optional arguments, described in the help text: diff --git a/xyz b/xyz index ac58de2..c24affa 100755 --- a/xyz +++ b/xyz @@ -164,4 +164,4 @@ run "git commit --message '$message'" run "git tag --annotate '$tag' --message '$message'" run "git push --atomic '$repo' 'refs/heads/$branch' 'refs/tags/$tag'" -run "npm publish" +node -e 'process.exit(require("./package.json").private === true ? 1 : 0)' && run "npm publish"