@@ -328,10 +328,21 @@ function entrypointBuildTask(options) {
328
328
} ,
329
329
} ) ;
330
330
331
+ const mainDeps = options . mainDeps ?. slice ( 0 ) ?? [ ] ;
332
+ if ( cmdLineOptions . bundle ) {
333
+ mainDeps . push ( bundle ) ;
334
+ if ( cmdLineOptions . typecheck ) {
335
+ mainDeps . push ( build ) ;
336
+ }
337
+ }
338
+ else {
339
+ mainDeps . push ( build , shim ) ;
340
+ }
341
+
331
342
const main = task ( {
332
343
name : options . name ,
333
344
description : options . description ,
334
- dependencies : ( options . mainDeps ?? [ ] ) . concat ( cmdLineOptions . bundle ? [ bundle ] : [ build , shim ] ) ,
345
+ dependencies : mainDeps ,
335
346
} ) ;
336
347
337
348
const watch = task ( {
@@ -358,7 +369,7 @@ function entrypointBuildTask(options) {
358
369
}
359
370
360
371
361
- const { main : tsc , build : buildTsc , watch : watchTsc } = entrypointBuildTask ( {
372
+ const { main : tsc , watch : watchTsc } = entrypointBuildTask ( {
362
373
name : "tsc" ,
363
374
description : "Builds the command-line compiler" ,
364
375
buildDeps : [ generateDiagnostics ] ,
@@ -396,7 +407,7 @@ export const dtsServices = task({
396
407
} ) ;
397
408
398
409
399
- const { main : tsserver , build : buildTsserver , watch : watchTsserver } = entrypointBuildTask ( {
410
+ const { main : tsserver , watch : watchTsserver } = entrypointBuildTask ( {
400
411
name : "tsserver" ,
401
412
description : "Builds the language server" ,
402
413
buildDeps : [ generateDiagnostics ] ,
@@ -414,15 +425,10 @@ const { main: tsserver, build: buildTsserver, watch: watchTsserver } = entrypoin
414
425
export { tsserver , watchTsserver } ;
415
426
416
427
417
- const buildMin = task ( {
418
- name : "build-min" ,
419
- dependencies : [ buildTsc , buildTsserver ] ,
420
- } ) ;
421
-
422
428
export const min = task ( {
423
429
name : "min" ,
424
430
description : "Builds only tsc and tsserver" ,
425
- dependencies : [ tsc , tsserver ] . concat ( cmdLineOptions . typecheck ? [ buildMin ] : [ ] ) ,
431
+ dependencies : [ tsc , tsserver ] ,
426
432
} ) ;
427
433
428
434
export const watchMin = task ( {
@@ -591,15 +597,10 @@ export const watchOtherOutputs = task({
591
597
dependencies : [ watchCancellationToken , watchTypingsInstaller , watchWatchGuard , generateTypesMap , copyBuiltLocalDiagnosticMessages ] ,
592
598
} ) ;
593
599
594
- const buildLocal = task ( {
595
- name : "build-local" ,
596
- dependencies : [ buildTsc , buildTsserver , buildServices , buildLssl ]
597
- } ) ;
598
-
599
600
export const local = task ( {
600
601
name : "local" ,
601
602
description : "Builds the full compiler and services" ,
602
- dependencies : [ localize , tsc , tsserver , services , lssl , otherOutputs , dts ] . concat ( cmdLineOptions . typecheck ? [ buildLocal ] : [ ] ) ,
603
+ dependencies : [ localize , tsc , tsserver , services , lssl , otherOutputs , dts ] ,
603
604
} ) ;
604
605
export default local ;
605
606
@@ -610,7 +611,7 @@ export const watchLocal = task({
610
611
dependencies : [ localize , watchTsc , watchTsserver , watchServices , watchLssl , watchOtherOutputs , dts , watchSrc ] ,
611
612
} ) ;
612
613
613
- const runtestsDeps = [ tests , generateLibs ] . concat ( cmdLineOptions . typecheck ? [ dts , buildSrc ] : [ ] ) ;
614
+ const runtestsDeps = [ tests , generateLibs ] . concat ( cmdLineOptions . typecheck ? [ dts ] : [ ] ) ;
614
615
615
616
export const runTests = task ( {
616
617
name : "runtests" ,
0 commit comments