You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+35-15
Original file line number
Diff line number
Diff line change
@@ -103,22 +103,44 @@ For more advanced documentation generation, you can provide your own [typedoc th
103
103
yarn docs:json
104
104
```
105
105
106
-
## Generate/update changelog & release
106
+
## Generate/update changelog & tag release
107
107
108
108
This project is tooled for [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog) to make managing releases easier. See the [standard-version](https://github.com/conventional-changelog/standard-version) documentation for more information on the workflow, or [`CHANGELOG.md`](CHANGELOG.md) for an example.
109
109
110
110
```bash
111
111
# bump package.json version, update CHANGELOG.md, git tag the release
112
+
yarn changelog
113
+
```
114
+
115
+
## One-step publish preparation script
116
+
117
+
Bringing together many of the steps above, this repo includes a one-step release command.
118
+
119
+
```bash
120
+
# Standard release
112
121
yarn release
113
122
# Release without bumping package.json version
114
-
yarn release -- --first-release
123
+
yarn changelog -- --first-release
115
124
# PGP sign the release
116
-
yarn release -- --sign
125
+
yarn changelog -- --sign
126
+
```
127
+
128
+
This command runs:
129
+
-`yarn reset`: cleans the repo by removing all untracked files and resetting `--hard` to the latest commit. (**Note: this could be destructive.**)
130
+
-`yarn test`: build and fully test the project
131
+
-`yarn docs:publish`: generate and publish the latest version of the documentation to GitHub Pages
132
+
-`yarn changelog`: bump package.json version, update CHANGELOG.md, and git tag the release
133
+
134
+
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:
135
+
136
+
```
137
+
git push --follow-tags origin master; npm publish
117
138
```
139
+
Look over the release if you'd like, then execute the command to publish everything.
118
140
119
141
## All package scripts
120
142
121
-
You can run the `info` script for information on each available package script.
143
+
You can run the `info` script for information on each script intended to be individually run.
122
144
123
145
```
124
146
yarn run info
@@ -130,27 +152,25 @@ yarn run info
130
152
lint:
131
153
Lint all typescript source files
132
154
unit:
133
-
Run unit tests
155
+
Build the library and run unit tests
134
156
test:
135
-
Lint and test the library
157
+
Lint, build, and test the library
136
158
watch:
137
159
Watch source files, rebuild library on changes, rerun relevant tests
138
-
watch:build:
139
-
Watch source files, rebuild library on changes
140
-
watch:unit:
141
-
Watch the build, rerun relevant tests on changes
142
160
cov:
143
161
Run tests, generate the HTML coverage report, and open it in a browser
144
-
html-coverage:
145
-
Output HTML test coverage report
146
-
send-coverage:
147
-
Output lcov test coverage report and send it to codecov
148
162
docs:
149
-
Generate API documentation and open it in a browser
163
+
Generate HTML API documentation and open it in a browser
164
+
docs:publish:
165
+
Generate HTML API documentation and push it to GitHub Pages
150
166
docs:json:
151
167
Generate API documentation in typedoc JSON format
152
168
release:
153
169
Bump package.json version, update CHANGELOG.md, tag a release
170
+
reset:
171
+
Delete all untracked files and reset the repo to the last commit
172
+
publish:
173
+
Reset, build, test, publish docs, and prepare release (a one-step publish process)
0 commit comments