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
+22-16Lines changed: 22 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
16
16
Run one simple command to install and use the interactive project generator. You'll need [Node](https://nodejs.org/)`v10` or later.
17
17
18
-
```bash
18
+
```sh
19
19
npx typescript-starter
20
20
```
21
21
@@ -56,15 +56,21 @@ Also consider installing editor extensions for [ESLint](https://github.com/Micro
56
56
57
57
## Development zen
58
58
59
-
To start working, run the `watch` task using [`npm`](https://docs.npmjs.com/getting-started/what-is-npm) or [`yarn`](https://yarnpkg.com/).
59
+
To start working, run the `watch:build` task using [`npm`](https://docs.npmjs.com/getting-started/what-is-npm) or [`yarn`](https://yarnpkg.com/).
60
60
61
-
```bash
62
-
npm run watch
61
+
```sh
62
+
npm run watch:build
63
63
```
64
64
65
-
This starter includes a watch task which makes development faster and more interactive. It's particularly helpful for [TDD](https://en.wikipedia.org/wiki/Test-driven_development)/[BDD](https://en.wikipedia.org/wiki/Behavior-driven_development) workflows.
65
+
In another terminal tab/window, run the `watch:test` task:
66
66
67
-
The watch task will build and watch the entire project for changes (to both the library source files and test source files). As you develop, you can add tests for new functionality – which will initially fail – before developing the new functionality. Each time you save, any changes will be rebuilt and retested.
67
+
```sh
68
+
npm run watch:test
69
+
```
70
+
71
+
These watch tasks make development much faster and more interactive. They're particularly helpful for [TDD](https://en.wikipedia.org/wiki/Test-driven_development)/[BDD](https://en.wikipedia.org/wiki/Behavior-driven_development) workflows.
72
+
73
+
These watch tasks will build and watch the entire project for changes (to both the library source files and test source files). As you develop, you can add tests for new functionality – which will initially fail – before developing the new functionality. Each time you save, any changes will be rebuilt and retested.
68
74
69
75
<palign="center">
70
76
<!-- PR request: capture the magic of using a test-running watch task for development -->
@@ -83,15 +89,15 @@ To enable additional Typescript type checking features (a good idea for mission-
83
89
84
90
To automatically fix `eslint` and `prettier` formatting issues, run:
85
91
86
-
```
92
+
```sh
87
93
npm run fix
88
94
```
89
95
90
96
## View test coverage
91
97
92
98
To generate and view test coverage, run:
93
99
94
-
```bash
100
+
```sh
95
101
npm run cov
96
102
```
97
103
@@ -105,7 +111,7 @@ This will create an HTML report of test coverage – source-mapped back to Types
105
111
106
112
The src folder is analyzed and documentation is automatically generated using [TypeDoc](https://github.com/TypeStrong/typedoc).
107
113
108
-
```bash
114
+
```sh
109
115
npm run doc
110
116
```
111
117
@@ -115,7 +121,7 @@ Since types are tracked by Typescript, there's no need to indicate types in JSDo
115
121
116
122
To generate and publish your documentation to [GitHub Pages](https://pages.github.com/) use the following command:
117
123
118
-
```bash
124
+
```sh
119
125
npm run doc:publish
120
126
```
121
127
@@ -127,15 +133,15 @@ Once published, your documentation should be available at the proper GitHub Page
127
133
128
134
For more advanced documentation generation, you can provide your own [TypeDoc theme](http://typedoc.org/guides/themes/), or [build your own documentation](https://blog.cloudflare.com/generating-documentation-for-typescript-projects/) using the JSON TypeDoc export:
129
135
130
-
```bash
136
+
```sh
131
137
npm run doc:json
132
138
```
133
139
134
140
## Bump version, update changelog, commit, & tag release
135
141
136
142
It's recommended that you install [`commitizen`](https://github.com/commitizen/cz-cli) to make commits to your project.
137
143
138
-
```bash
144
+
```sh
139
145
npm install -g commitizen
140
146
141
147
# commit your changes:
@@ -144,7 +150,7 @@ git cz
144
150
145
151
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.
146
152
147
-
```bash
153
+
```sh
148
154
# bump package.json version, update CHANGELOG.md, git tag the release
149
155
npm run version
150
156
```
@@ -155,7 +161,7 @@ You may find a tool like [**`wip`**](https://github.com/bitjson/wip) helpful for
155
161
156
162
Bringing together many of the steps above, this repo includes a one-step release preparation command.
157
163
158
-
```bash
164
+
```sh
159
165
# Prepare a standard release:
160
166
npm run prepare-release
161
167
```
@@ -170,15 +176,15 @@ This command runs the following tasks:
170
176
171
177
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:
172
178
173
-
```bash
179
+
```sh
174
180
git push --follow-tags origin master; npm publish
175
181
```
176
182
177
183
Look over the release if you'd like, then execute the command to publish everything.
178
184
179
185
You can also prepare a non-standard release:
180
186
181
-
```bash
187
+
```sh
182
188
# Or a non-standard release:
183
189
184
190
# Reset the repo to the latest commit and build everything
0 commit comments