@@ -46,7 +46,7 @@ const produceLKGJs = "scripts/produceLKG.js";
4646const word2mdJs = "scripts/word2md.js" ;
4747gulp . task ( "scripts" , /*help*/ false , ( ) => project . compile ( scriptsProject ) , {
4848 aliases : [
49- configurePrereleaseJs ,
49+ configurePrereleaseJs ,
5050 processDiagnosticMessagesJs ,
5151 generateLocalizedDiagnosticMessagesJs ,
5252 produceLKGJs ,
@@ -134,10 +134,11 @@ gulp.task(generatedLCGFile, /*help*/ false, [generateLocalizedDiagnosticMessages
134134
135135gulp . task ( "localize" , /*help*/ false , [ generatedLCGFile ] ) ;
136136
137+ const servicesProject = "src/services/tsconfig.json" ;
137138const typescriptServicesProject = "built/local/typescriptServices.tsconfig.json" ;
138139gulp . task ( typescriptServicesProject , /*help*/ false , ( ) => {
139140 // NOTE: flatten services so that we can properly strip @internal
140- project . flatten ( "src/services/tsconfig.json" , typescriptServicesProject , {
141+ project . flatten ( servicesProject , typescriptServicesProject , {
141142 compilerOptions : {
142143 "removeComments" : true ,
143144 "stripInternal" : true ,
@@ -148,7 +149,7 @@ gulp.task(typescriptServicesProject, /*help*/ false, () => {
148149
149150const typescriptServicesJs = "built/local/typescriptServices.js" ;
150151const 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 ] , ( ) =>
152153 project . compile ( typescriptServicesProject , { dts : files => files . pipe ( convertConstEnums ( ) ) } ) ,
153154 { aliases : [ typescriptServicesDts ] } ) ;
154155
@@ -225,7 +226,7 @@ gulp.task(tsserverlibraryProject, /*help*/ false, () => {
225226const tsserverlibraryJs = "built/local/tsserverlibrary.js" ;
226227const tsserverlibraryDts = "built/local/tsserverlibrary.d.ts" ;
227228gulp . task ( tsserverlibraryJs , /*help*/ false , [ typescriptServicesJs , tsserverlibraryProject ] , ( ) =>
228- project . compile ( tsserverlibraryProject , {
229+ project . compile ( tsserverlibraryProject , {
229230 dts : files => files
230231 . pipe ( convertConstEnums ( ) )
231232 . pipe ( append ( "\nexport = ts;\nexport as namespace ts;" ) ) ,
@@ -253,21 +254,21 @@ gulp.task(specMd, /*help*/ false, [word2mdJs], () =>
253254 exec ( "cscript" , [ "//nologo" , word2mdJs , path . resolve ( specMd ) , path . resolve ( "doc/TypeScript Language Specification.docx" ) ] ) ) ;
254255
255256gulp . 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" ,
258259 [ specMd ] ) ;
259260
260261gulp . task ( "produce-LKG" , /*help*/ false , [ "scripts" , "local" , cancellationTokenJs , typingsInstallerJs , watchGuardJs , tscReleaseJs ] , ( ) => {
261262 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 ,
271272 cancellationTokenJs
272273 ] . concat ( libraryTargets ) ;
273274 const missingFiles = expectedFiles
@@ -286,8 +287,8 @@ gulp.task("produce-LKG", /*help*/ false, ["scripts", "local", cancellationTokenJ
286287} ) ;
287288
288289gulp . 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" ,
291292 ( ) => runSequence ( "clean-built" , "produce-LKG" ) ) ;
292293
293294// Task to build the tests infrastructure using the built compiler
@@ -464,12 +465,40 @@ gulp.task(
464465 "Runs 'local'" ,
465466 [ "local" ] ) ;
466467
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+
467479gulp . task (
468480 "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 ] ,
471483 ( ) => project . watch ( tscProject , { typescript : "built" } ) ) ;
472484
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+
473502gulp . task (
474503 "watch" ,
475504 "Watches for changes to the build inputs for built/local/run.js executes runtests-parallel." ,
0 commit comments