From d86fc02cee5bd5efe64f05a028110e246019c24c Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Sun, 11 Mar 2018 17:08:00 -0400 Subject: [PATCH] docs(readme): clarify release options --- README.md | 27 ++++++++++++++++++++------- package.json | 13 +++++++------ src/cli/tests/cli.integration.spec.ts | 4 ++-- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e233101..6acab84 100644 --- a/README.md +++ b/README.md @@ -150,15 +150,28 @@ npm run changelog ## One-step publish preparation script -Bringing together many of the steps above, this repo includes a one-step release command. +Bringing together many of the steps above, this repo includes a one-step release preparation command. ```bash -# Standard release -npm run release -# Release without bumping package.json version -npm run changelog -- --first-release -# PGP sign the release -npm run changelog -- --sign +# Prepare a standard release: +npm run prepare-release +``` + +You can also prepare a non-standard release: + +```bash +# Or a non-standard release: + +# Build everything +npm run all + +# Then version it +npm run version -- --first-release # don't bump package.json version +npm run version -- --sign # PGP sign it +npm run version -- --prerelease alpha # alpha release + +# And don't forget to push the docs to GitHub pages: +npm run docs:publish ``` This command runs the following tasks: diff --git a/package.json b/package.json index d9fd0a2..878a52d 100644 --- a/package.json +++ b/package.json @@ -49,13 +49,14 @@ "cov:send": "nyc report --reporter=lcov > coverage.lcov && codecov", "cov:check": "nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100", "doc": "run-s doc:html && opn build/docs/index.html", - "doc:html": "typedoc src/index.ts --excludePrivate --mode file --theme minimal --out build/docs", - "doc:json": "typedoc --mode file --json build/docs/typedoc.json src/index.ts", - "docs:publish": "gh-pages -d build/docs", - "changelog": "standard-version", + "doc:html": "typedoc src/ --target ES6 --mode file --out build/docs", + "doc:json": "typedoc src/ --target ES6 --mode file --json build/docs/typedoc.json", + "doc:publish": "gh-pages -d build/docs", + "version": "standard-version", "reset": "git clean -dfx && git reset --hard && npm i", "clean": "trash build test", - "release": "run-s reset test cov:check docs:html docs:publish changelog" + "all": "run-s reset test cov:check doc:html", + "prepare-release": "run-s all version doc:publish" }, "scripts-info": { "info": "Display information about the package scripts", @@ -68,7 +69,7 @@ "doc:json": "Generate API documentation in typedoc JSON format", "changelog": "Bump package.json version, update CHANGELOG.md, tag release", "reset": "Delete all untracked files and reset the repo to the last commit", - "release": "One-step: clean, build, test, publish docs, and prep a release" + "prepare-release": "One-step: clean, build, test, publish docs, and prep a release" }, "engines": { "node": ">=8.9" diff --git a/src/cli/tests/cli.integration.spec.ts b/src/cli/tests/cli.integration.spec.ts index 813d27e..a3a7db2 100644 --- a/src/cli/tests/cli.integration.spec.ts +++ b/src/cli/tests/cli.integration.spec.ts @@ -381,7 +381,7 @@ test(`${ 'test-5/LICENSE': 'd11b4dba04062af8bd80b052066daf1c', 'test-5/README.md': '8fc7ecb21d7d47289e4b2469eea4db39', 'test-5/bin/typescript-starter': 'a4ad3923f37f50df986b43b1adb9f6b3', - 'test-5/package.json': '4095a1229e363a8f7152a18a5fd910db', + 'test-5/package.json': '350b37ef2d615462eeefc27d84d1eb21', 'test-5/src/index.ts': '5991bedc40ac87a01d880c6db16fe349', 'test-5/src/lib/number.spec.ts': '40ebb014eb7871d1f810c618aba1d589', 'test-5/src/lib/number.ts': '43756f90e6ac0b1c4ee6c81d8ab969c7', @@ -414,7 +414,7 @@ test(`${TestDirectories.six}: Sandboxed: yarn, no initial commit`, async t => { 'test-6/LICENSE': '1dfe8c78c6af40fc14ea3b40133f1fa5', 'test-6/README.md': 'd809bcbf240f44b51b575a3d49936232', 'test-6/bin/typescript-starter': 'a4ad3923f37f50df986b43b1adb9f6b3', - 'test-6/package.json': '4e77e79b8944203aaaf11f28a69e4fce', + 'test-6/package.json': '635cf9c0e9fd16e9c29679108b8ebc3d', 'test-6/src/index.ts': 'fbc67c2cbf3a7d37e4e02583bf06eec9', 'test-6/src/lib/async.spec.ts': '1e83b84de3f3b068244885219acb42bd', 'test-6/src/lib/async.ts': '9012c267bb25fa98ad2561929de3d4e2',