docs(version): correct documentation on 'version' package script
Fixes #85
This commit is contained in:
51
README.md
51
README.md
@@ -124,7 +124,7 @@ For more advanced documentation generation, you can provide your own [TypeDoc th
|
||||
npm run doc:json
|
||||
```
|
||||
|
||||
## Update the changelog, commit, & tag release
|
||||
## Bump version, update changelog, commit, & tag release
|
||||
|
||||
It's recommended that you install [`commitizen`](https://github.com/commitizen/cz-cli) to make commits to your project.
|
||||
|
||||
@@ -139,7 +139,7 @@ This project is tooled for [conventional changelog](https://github.com/conventio
|
||||
|
||||
```bash
|
||||
# bump package.json version, update CHANGELOG.md, git tag the release
|
||||
npm run changelog
|
||||
npm run version
|
||||
```
|
||||
|
||||
You may find a tool like [**`wip`**](https://github.com/bitjson/wip) helpful for managing work in progress before you're ready to create a meaningful commit.
|
||||
@@ -153,30 +153,13 @@ Bringing together many of the steps above, this repo includes a one-step 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 doc:publish
|
||||
```
|
||||
|
||||
This command runs the following tasks:
|
||||
|
||||
* `reset`: cleans the repo by removing all untracked files and resetting `--hard` to the latest commit. (**Note: this could be destructive.**)
|
||||
* `test`: build and fully test the project
|
||||
* `docs:html`: generate the latest version of the documentation
|
||||
* `docs:publish`: publish the documentation to GitHub Pages
|
||||
* `changelog`: bump package.json version, update CHANGELOG.md, and git tag the release
|
||||
* `version`: bump package.json version, update CHANGELOG.md, and git tag the release
|
||||
|
||||
When the script finishes, it will log the final command needed to push the release commit to the repo and publish the package on the `npm` registry:
|
||||
|
||||
@@ -186,6 +169,30 @@ git push --follow-tags origin master; npm publish
|
||||
|
||||
Look over the release if you'd like, then execute the command to publish everything.
|
||||
|
||||
You can also prepare a non-standard release:
|
||||
|
||||
```bash
|
||||
# Or a non-standard release:
|
||||
|
||||
# Build everything
|
||||
npm run all
|
||||
|
||||
# Then version it with standard-version options. e.g.:
|
||||
# don't bump package.json version
|
||||
npm run version -- --first-release
|
||||
|
||||
# Other popular options include:
|
||||
|
||||
# PGP sign it:
|
||||
# $ npm run version -- --sign
|
||||
|
||||
# alpha release:
|
||||
# $ npm run version -- --prerelease alpha
|
||||
|
||||
# And don't forget to push the docs to GitHub pages:
|
||||
npm run doc:publish
|
||||
```
|
||||
|
||||
## Get scripts info
|
||||
|
||||
You can run the `info` script for information on each script intended to be individually run.
|
||||
@@ -211,11 +218,11 @@ doc:
|
||||
Generate HTML API documentation and open it in a browser
|
||||
doc:json:
|
||||
Generate API documentation in typedoc JSON format
|
||||
changelog:
|
||||
version:
|
||||
Bump package.json version, update CHANGELOG.md, tag release
|
||||
reset:
|
||||
Delete all untracked files and reset the repo to the last commit
|
||||
release:
|
||||
prepare-release:
|
||||
One-step: clean, build, test, publish docs, and prep a release
|
||||
```
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"cov": "Rebuild, run tests, then create and open the coverage report",
|
||||
"doc": "Generate HTML API documentation and open it in a browser",
|
||||
"doc:json": "Generate API documentation in typedoc JSON format",
|
||||
"changelog": "Bump package.json version, update CHANGELOG.md, tag release",
|
||||
"version": "Bump package.json version, update CHANGELOG.md, tag release",
|
||||
"reset": "Delete all untracked files and reset the repo to the last commit",
|
||||
"prepare-release": "One-step: clean, build, test, publish docs, and prep a release"
|
||||
},
|
||||
|
||||
@@ -448,7 +448,7 @@ test(`${
|
||||
'test-5/.prettierignore': '1da1ce4fdb868f0939608fafd38f9683',
|
||||
'test-5/LICENSE': '8786d80048d9c837477dc3b807aaf598',
|
||||
'test-5/README.md': '8fc7ecb21d7d47289e4b2469eea4db39',
|
||||
'test-5/package.json': '854400ffaecaae954473806fdff74af2',
|
||||
'test-5/package.json': '5c46e0cde83b803f8210c3bc63221c7f',
|
||||
'test-5/src/index.ts': '5025093b4dc30524d349fd1cc465ed30',
|
||||
'test-5/src/lib/number.spec.ts': '40ebb014eb7871d1f810c618aba1d589',
|
||||
'test-5/src/lib/number.ts': '43756f90e6ac0b1c4ee6c81d8ab969c7',
|
||||
@@ -495,7 +495,7 @@ test(`${TestDirectories.six}: Sandboxed: yarn, no initial commit`, async t => {
|
||||
'test-6/LICENSE': '1f08fdd25d16c4ee8d5233b9cb7f6051',
|
||||
'test-6/README.md': 'd809bcbf240f44b51b575a3d49936232',
|
||||
'test-6/appveyor.yml': 'ad473b824b29edfd21c18cfc8ae8e0ea',
|
||||
'test-6/package.json': 'd319b6d47d943aaacc81bd4da3b7a845',
|
||||
'test-6/package.json': '3be7bf52d7227f724a4ec1f916897d58',
|
||||
'test-6/src/index.ts': 'fbc67c2cbf3a7d37e4e02583bf06eec9',
|
||||
'test-6/src/lib/async.spec.ts': '1e83b84de3f3b068244885219acb42bd',
|
||||
'test-6/src/lib/async.ts': '9012c267bb25fa98ad2561929de3d4e2',
|
||||
|
||||
Reference in New Issue
Block a user