@@ -46,7 +46,7 @@ const produceLKGJs = "scripts/produceLKG.js";
46
46
const word2mdJs = "scripts/word2md.js" ;
47
47
gulp . task ( "scripts" , /*help*/ false , ( ) => project . compile ( scriptsProject ) , {
48
48
aliases : [
49
- configurePrereleaseJs ,
49
+ configurePrereleaseJs ,
50
50
processDiagnosticMessagesJs ,
51
51
generateLocalizedDiagnosticMessagesJs ,
52
52
produceLKGJs ,
@@ -134,10 +134,11 @@ gulp.task(generatedLCGFile, /*help*/ false, [generateLocalizedDiagnosticMessages
134
134
135
135
gulp . task ( "localize" , /*help*/ false , [ generatedLCGFile ] ) ;
136
136
137
+ const servicesProject = "src/services/tsconfig.json" ;
137
138
const typescriptServicesProject = "built/local/typescriptServices.tsconfig.json" ;
138
139
gulp . task ( typescriptServicesProject , /*help*/ false , ( ) => {
139
140
// NOTE: flatten services so that we can properly strip @internal
140
- project . flatten ( "src/services/tsconfig.json" , typescriptServicesProject , {
141
+ project . flatten ( servicesProject , typescriptServicesProject , {
141
142
compilerOptions : {
142
143
"removeComments" : true ,
143
144
"stripInternal" : true ,
@@ -148,7 +149,7 @@ gulp.task(typescriptServicesProject, /*help*/ false, () => {
148
149
149
150
const typescriptServicesJs = "built/local/typescriptServices.js" ;
150
151
const typescriptServicesDts = "built/local/typescriptServices.d.ts" ;
151
- gulp . task ( typescriptServicesJs , /*help*/ false , [ "lib" , "generate-diagnostics" , typescriptServicesProject ] , ( ) =>
152
+ gulp . task ( typescriptServicesJs , /*help*/ false , [ "lib" , "generate-diagnostics" , typescriptServicesProject ] , ( ) =>
152
153
project . compile ( typescriptServicesProject , { dts : files => files . pipe ( convertConstEnums ( ) ) } ) ,
153
154
{ aliases : [ typescriptServicesDts ] } ) ;
154
155
@@ -225,7 +226,7 @@ gulp.task(tsserverlibraryProject, /*help*/ false, () => {
225
226
const tsserverlibraryJs = "built/local/tsserverlibrary.js" ;
226
227
const tsserverlibraryDts = "built/local/tsserverlibrary.d.ts" ;
227
228
gulp . task ( tsserverlibraryJs , /*help*/ false , [ typescriptServicesJs , tsserverlibraryProject ] , ( ) =>
228
- project . compile ( tsserverlibraryProject , {
229
+ project . compile ( tsserverlibraryProject , {
229
230
dts : files => files
230
231
. pipe ( convertConstEnums ( ) )
231
232
. pipe ( append ( "\nexport = ts;\nexport as namespace ts;" ) ) ,
@@ -253,21 +254,21 @@ gulp.task(specMd, /*help*/ false, [word2mdJs], () =>
253
254
exec ( "cscript" , [ "//nologo" , word2mdJs , path . resolve ( specMd ) , path . resolve ( "doc/TypeScript Language Specification.docx" ) ] ) ) ;
254
255
255
256
gulp . task (
256
- "generate-spec" ,
257
- "Generates a Markdown version of the Language Specification" ,
257
+ "generate-spec" ,
258
+ "Generates a Markdown version of the Language Specification" ,
258
259
[ specMd ] ) ;
259
260
260
261
gulp . task ( "produce-LKG" , /*help*/ false , [ "scripts" , "local" , cancellationTokenJs , typingsInstallerJs , watchGuardJs , tscReleaseJs ] , ( ) => {
261
262
const expectedFiles = [
262
- tscReleaseJs ,
263
- typescriptServicesJs ,
264
- tsserverJs ,
265
- typescriptJs ,
266
- typescriptDts ,
267
- typescriptServicesDts ,
268
- tsserverlibraryDts ,
269
- tsserverlibraryDts ,
270
- typingsInstallerJs ,
263
+ tscReleaseJs ,
264
+ typescriptServicesJs ,
265
+ tsserverJs ,
266
+ typescriptJs ,
267
+ typescriptDts ,
268
+ typescriptServicesDts ,
269
+ tsserverlibraryDts ,
270
+ tsserverlibraryDts ,
271
+ typingsInstallerJs ,
271
272
cancellationTokenJs
272
273
] . concat ( libraryTargets ) ;
273
274
const missingFiles = expectedFiles
@@ -286,8 +287,8 @@ gulp.task("produce-LKG", /*help*/ false, ["scripts", "local", cancellationTokenJ
286
287
} ) ;
287
288
288
289
gulp . task (
289
- "LKG" ,
290
- "Makes a new LKG out of the built js files" ,
290
+ "LKG" ,
291
+ "Makes a new LKG out of the built js files" ,
291
292
( ) => runSequence ( "clean-built" , "produce-LKG" ) ) ;
292
293
293
294
// Task to build the tests infrastructure using the built compiler
@@ -464,12 +465,40 @@ gulp.task(
464
465
"Runs 'local'" ,
465
466
[ "local" ] ) ;
466
467
468
+ gulp . task (
469
+ "watch-diagnostics" ,
470
+ /*help*/ false ,
471
+ [ processDiagnosticMessagesJs ] ,
472
+ ( ) => gulp . watch ( [ diagnosticMessagesJson ] , [ diagnosticInformationMapTs , builtGeneratedDiagnosticMessagesJson ] ) ) ;
473
+
474
+ gulp . task (
475
+ "watch-lib" ,
476
+ /*help*/ false ,
477
+ ( ) => gulp . watch ( [ "src/lib/**/*" ] , [ "lib" ] ) ) ;
478
+
467
479
gulp . task (
468
480
"watch-tsc" ,
469
- "Watches for changes to the build inputs for built/local/tsc.js" ,
470
- [ typescriptServicesJs ] ,
481
+ /*help*/ false ,
482
+ [ "watch-diagnostics" , "watch-lib" , typescriptServicesJs ] ,
471
483
( ) => project . watch ( tscProject , { typescript : "built" } ) ) ;
472
484
485
+ gulp . task (
486
+ "watch-services" ,
487
+ /*help*/ false ,
488
+ [ "watch-diagnostics" , "watch-lib" , typescriptServicesJs ] ,
489
+ ( ) => project . watch ( servicesProject , { typescript : "built" } ) ) ;
490
+
491
+ gulp . task (
492
+ "watch-server" ,
493
+ /*help*/ false ,
494
+ [ "watch-diagnostics" , "watch-lib" , typescriptServicesJs ] ,
495
+ ( ) => project . watch ( tsserverProject , { typescript : "built" } ) ) ;
496
+
497
+ gulp . task (
498
+ "watch-local" ,
499
+ /*help*/ false ,
500
+ [ "watch-lib" , "watch-tsc" , "watch-services" , "watch-server" ] ) ;
501
+
473
502
gulp . task (
474
503
"watch" ,
475
504
"Watches for changes to the build inputs for built/local/run.js executes runtests-parallel." ,
0 commit comments