@@ -320,7 +320,7 @@ function entrypointBuildTask(options) {
320
320
const outDir = path . dirname ( options . output ) ;
321
321
await fs . promises . mkdir ( outDir , { recursive : true } ) ;
322
322
const moduleSpecifier = path . relative ( outDir , options . builtEntrypoint ) ;
323
- await fs . promises . writeFile ( options . output , `module.exports = require("./${ moduleSpecifier } ")` ) ;
323
+ await fs . promises . writeFile ( options . output , `module.exports = require("./${ moduleSpecifier . replace ( / [ \\ / ] / g , "/" ) } ")` ) ;
324
324
} ,
325
325
} ) ;
326
326
@@ -354,7 +354,7 @@ function entrypointBuildTask(options) {
354
354
}
355
355
356
356
357
- const { main : tsc , watch : watchTsc } = entrypointBuildTask ( {
357
+ const { main : tsc , build : buildTsc , watch : watchTsc } = entrypointBuildTask ( {
358
358
name : "tsc" ,
359
359
description : "Builds the command-line compiler" ,
360
360
buildDeps : [ generateDiagnostics ] ,
@@ -392,7 +392,7 @@ export const dtsServices = task({
392
392
} ) ;
393
393
394
394
395
- const { main : tsserver , watch : watchTsserver } = entrypointBuildTask ( {
395
+ const { main : tsserver , build : buildTsserver , watch : watchTsserver } = entrypointBuildTask ( {
396
396
name : "tsserver" ,
397
397
description : "Builds the language server" ,
398
398
buildDeps : [ generateDiagnostics ] ,
@@ -410,10 +410,15 @@ const { main: tsserver, watch: watchTsserver } = entrypointBuildTask({
410
410
export { tsserver , watchTsserver } ;
411
411
412
412
413
+ const buildMin = task ( {
414
+ name : "build-min" ,
415
+ dependencies : [ buildTsc , buildTsserver ] ,
416
+ } ) ;
417
+
413
418
export const min = task ( {
414
419
name : "min" ,
415
420
description : "Builds only tsc and tsserver" ,
416
- dependencies : [ tsc , tsserver ] ,
421
+ dependencies : [ tsc , tsserver ] . concat ( cmdLineOptions . typecheck ? [ buildMin ] : [ ] ) ,
417
422
} ) ;
418
423
419
424
export const watchMin = task ( {
@@ -577,10 +582,15 @@ export const watchOtherOutputs = task({
577
582
dependencies : [ watchCancellationToken , watchTypingsInstaller , watchWatchGuard , generateTypesMap , copyBuiltLocalDiagnosticMessages ] ,
578
583
} ) ;
579
584
585
+ const buildLocal = task ( {
586
+ name : "build-local" ,
587
+ dependencies : [ buildTsc , buildTsserver , buildServices , buildLssl ]
588
+ } ) ;
589
+
580
590
export const local = task ( {
581
591
name : "local" ,
582
592
description : "Builds the full compiler and services" ,
583
- dependencies : [ localize , tsc , tsserver , services , lssl , otherOutputs , dts , buildSrc ] ,
593
+ dependencies : [ localize , tsc , tsserver , services , lssl , otherOutputs , dts ] . concat ( cmdLineOptions . typecheck ? [ buildLocal ] : [ ] ) ,
584
594
} ) ;
585
595
export default local ;
586
596
@@ -591,11 +601,12 @@ export const watchLocal = task({
591
601
dependencies : [ localize , watchTsc , watchTsserver , watchServices , watchLssl , watchOtherOutputs , dts , watchSrc ] ,
592
602
} ) ;
593
603
604
+ const runtestsDeps = [ tests , generateLibs ] . concat ( cmdLineOptions . typecheck ? [ dts , buildSrc ] : [ ] ) ;
594
605
595
606
export const runTests = task ( {
596
607
name : "runtests" ,
597
608
description : "Runs the tests using the built run.js file." ,
598
- dependencies : [ tests , generateLibs , dts , buildSrc ] ,
609
+ dependencies : runtestsDeps ,
599
610
run : ( ) => runConsoleTests ( testRunner , "mocha-fivemat-progress-reporter" , /*runInParallel*/ false ) ,
600
611
} ) ;
601
612
// task("runtests").flags = {
@@ -617,7 +628,7 @@ export const runTests = task({
617
628
export const runTestsParallel = task ( {
618
629
name : "runtests-parallel" ,
619
630
description : "Runs all the tests in parallel using the built run.js file." ,
620
- dependencies : [ tests , generateLibs , dts , buildSrc ] ,
631
+ dependencies : runtestsDeps ,
621
632
run : ( ) => runConsoleTests ( testRunner , "min" , /*runInParallel*/ cmdLineOptions . workers > 1 ) ,
622
633
} ) ;
623
634
// task("runtests-parallel").flags = {
0 commit comments