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: CONTRIBUTING.md
+24-14Lines changed: 24 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,16 @@ In general, things we find useful when reviewing suggestions are:
47
47
48
48
# Instructions for Contributing Code
49
49
50
+
## Tips
51
+
52
+
### Faster clones
53
+
54
+
The TypeScript repository is relatively large. To save some time, you might want to clone it without the repo's full history using `git clone --depth=1`.
55
+
56
+
### Using local builds
57
+
58
+
Run `gulp` to build a version of the compiler/language service that reflects changes you've made. You can then run `node <repo-root>/built/local/tsc.js` in place of `tsc` in your project. For example, to run `tsc --watch` from within the root of the repository on a file called `test.ts`, you can run `node ./built/local/tsc.js --watch test.ts`.
59
+
50
60
## Contributing bug fixes
51
61
52
62
TypeScript is currently accepting contributions in the form of bug fixes. A bug must have an issue tracking it in the issue tracker that has been approved ("Milestone == Community") by the TypeScript team. Your pull request should include a link to the bug that you are fixing. If you've submitted a PR for a bug, please post a comment in the bug to avoid duplication of effort.
@@ -94,7 +104,7 @@ Any changes should be made to [src/lib](https://github.com/Microsoft/TypeScript/
94
104
Library files in `built/local/` are updated automatically by running the standard build task:
95
105
96
106
```sh
97
-
jake
107
+
gulp
98
108
```
99
109
100
110
The files in `lib/` are used to bootstrap compilation and usually **should not** be updated unless publishing a new version or updating the LKG.
@@ -105,49 +115,49 @@ The files `src/lib/dom.generated.d.ts` and `src/lib/webworker.generated.d.ts` bo
105
115
106
116
## Running the Tests
107
117
108
-
To run all tests, invoke the `runtests-parallel` target using jake:
118
+
To run all tests, invoke the `runtests-parallel` target using gulp:
109
119
110
120
```Shell
111
-
jake runtests-parallel
121
+
gulp runtests-parallel
112
122
```
113
123
114
124
This will run all tests; to run only a specific subset of tests, use:
115
125
116
126
```Shell
117
-
jake runtests tests=<regex>
127
+
gulp runtests --tests=<regex>
118
128
```
119
129
120
130
e.g. to run all compiler baseline tests:
121
131
122
132
```Shell
123
-
jake runtests tests=compiler
133
+
gulp runtests --tests=compiler
124
134
```
125
135
126
136
or to run a specific test: `tests\cases\compiler\2dArrays.ts`
127
137
128
138
```Shell
129
-
jake runtests tests=2dArrays
139
+
gulp runtests --tests=2dArrays
130
140
```
131
141
132
142
## Debugging the tests
133
143
134
-
To debug the tests, invoke the `runtests-browser` task from jake.
144
+
To debug the tests, invoke the `runtests-browser` task from gulp.
135
145
You will probably only want to debug one test at a time:
136
146
137
147
```Shell
138
-
jake runtests-browser tests=2dArrays
148
+
gulp runtests-browser --tests=2dArrays
139
149
```
140
150
141
151
You can specify which browser to use for debugging. Currently Chrome and IE are supported:
You can debug with VS Code or Node instead with `jake runtests inspect=true`:
157
+
You can debug with VS Code or Node instead with `gulp runtests --inspect=true`:
148
158
149
159
```Shell
150
-
jake runtests tests=2dArrays inspect=true
160
+
gulp runtests --tests=2dArrays --inspect=true
151
161
```
152
162
153
163
## Adding a Test
@@ -187,20 +197,20 @@ Compiler testcases generate baselines that track the emitted `.js`, the errors p
187
197
When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use
188
198
189
199
```Shell
190
-
jake diff
200
+
gulp diff
191
201
```
192
202
193
203
After verifying that the changes in the baselines are correct, run
194
204
195
205
```Shell
196
-
jake baseline-accept
206
+
gulp baseline-accept
197
207
```
198
208
199
209
to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines.
200
210
201
211
## Localization
202
212
203
213
All strings the user may see are stored in [`diagnosticMessages.json`](./src/compiler/diagnosticMessages.json).
204
-
If you make changes to it, run `jake generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`.
214
+
If you make changes to it, run `gulp generate-diagnostics` to push them to the `Diagnostic` interface in `diagnosticInformationMap.generated.ts`.
205
215
206
216
See [coding guidelines on diagnostic messages](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#diagnostic-messages).
0 commit comments