@@ -43,7 +43,7 @@ const constEnumCaptureRegexp = /^(\s*)(export )?const enum (\S+) {(\s*)$/gm;
4343const constEnumReplacement = "$1$2enum $3 {$4" ;
4444
4545const cmdLineOptions = minimist ( process . argv . slice ( 2 ) , {
46- boolean : [ "debug" , "inspect" , "light" , "colors" , "lint" , "soft" ] ,
46+ boolean : [ "debug" , "inspect" , "light" , "colors" , "lint" , "soft" , "bail" ] ,
4747 string : [ "browser" , "tests" , "host" , "reporter" , "stackTraceLimit" , "timeout" ] ,
4848 alias : {
4949 "b" : "browser" ,
@@ -68,6 +68,7 @@ const cmdLineOptions = minimist(process.argv.slice(2), {
6868 runners : process . env . runners || process . env . runner || process . env . ru ,
6969 light : process . env . light === undefined || process . env . light !== "false" ,
7070 reporter : process . env . reporter || process . env . r ,
71+ bail : false ,
7172 lint : process . env . lint || true ,
7273 files : process . env . f || process . env . file || process . env . files || "" ,
7374 workers : process . env . workerCount || os . cpus ( ) . length ,
@@ -609,18 +610,60 @@ gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUse
609610} ) ;
610611
611612gulp . task ( "typemock" , ( ) => {
612- const typemock = tsc . createProject ( "scripts/typemock/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
613- return typemock . src ( )
613+ const project = tsc . createProject ( "scripts/typemock/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
614+ return project . src ( )
614615 . pipe ( sourcemaps . init ( ) )
615- . pipe ( newer ( "scripts/typemock/dist" ) )
616- . pipe ( typemock ( ) )
617- . pipe ( sourcemaps . write ( "." , < any > { includeContent : false , destPath : "scripts/typemock/dist" } ) )
616+ . pipe ( newer ( "scripts/typemock/dist/index.js " ) )
617+ . pipe ( project ( ) )
618+ . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/typemock/dist" } ) )
618619 . pipe ( gulp . dest ( "scripts/typemock/dist" ) ) ;
619620} ) ;
620621
622+ gulp . task ( "vfs-core" , ( ) => {
623+ const project = tsc . createProject ( "scripts/vfs-core/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
624+ return project . src ( )
625+ . pipe ( sourcemaps . init ( ) )
626+ . pipe ( newer ( "scripts/vfs-core/dist/index.js" ) )
627+ . pipe ( project ( ) )
628+ . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs-core/dist" } ) )
629+ . pipe ( gulp . dest ( "scripts/vfs-core/dist" ) ) ;
630+ } ) ;
631+
632+ gulp . task ( "vfs-errors" , ( ) => {
633+ const project = tsc . createProject ( "scripts/vfs-errors/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
634+ return project . src ( )
635+ . pipe ( sourcemaps . init ( ) )
636+ . pipe ( newer ( "scripts/vfs-errors/dist/index.js" ) )
637+ . pipe ( project ( ) )
638+ . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs-errors/dist" } ) )
639+ . pipe ( gulp . dest ( "scripts/vfs-errors/dist" ) ) ;
640+ } ) ;
641+
642+ gulp . task ( "vfs-path" , [ "vfs-core" , "vfs-errors" ] , ( ) => {
643+ const project = tsc . createProject ( "scripts/vfs-path/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
644+ return project . src ( )
645+ . pipe ( sourcemaps . init ( ) )
646+ . pipe ( newer ( "scripts/vfs-path/dist/index.js" ) )
647+ . pipe ( project ( ) )
648+ . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs-path/dist" } ) )
649+ . pipe ( gulp . dest ( "scripts/vfs-path/dist" ) ) ;
650+ } ) ;
651+
652+ gulp . task ( "vfs" , [ "vfs-core" , "vfs-errors" , "vfs-path" ] , ( ) => {
653+ const project = tsc . createProject ( "scripts/vfs/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
654+ return project . src ( )
655+ . pipe ( sourcemaps . init ( ) )
656+ . pipe ( newer ( "scripts/vfs/dist/index.js" ) )
657+ . pipe ( project ( ) )
658+ . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs/dist" } ) )
659+ . pipe ( gulp . dest ( "scripts/vfs/dist" ) ) ;
660+ } ) ;
661+
662+ gulp . task ( "private-packages" , [ "typemock" , "vfs" ] ) ;
663+
621664// Task to build the tests infrastructure using the built compiler
622665const run = path . join ( builtLocalDirectory , "run.js" ) ;
623- gulp . task ( run , /*help*/ false , [ servicesFile , tsserverLibraryFile , "typemock " ] , ( ) => {
666+ gulp . task ( run , /*help*/ false , [ servicesFile , tsserverLibraryFile , "private-packages " ] , ( ) => {
624667 const testProject = tsc . createProject ( "src/harness/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ true ) ) ;
625668 return testProject . src ( )
626669 . pipe ( newer ( run ) )
@@ -670,6 +713,7 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
670713 const runners = cmdLineOptions . runners ;
671714 const light = cmdLineOptions . light ;
672715 const stackTraceLimit = cmdLineOptions . stackTraceLimit ;
716+ const bail = cmdLineOptions . bail ;
673717 const testConfigFile = "test.config" ;
674718 if ( fs . existsSync ( testConfigFile ) ) {
675719 fs . unlinkSync ( testConfigFile ) ;
@@ -722,6 +766,9 @@ function runConsoleTests(defaultReporter: string, runInParallel: boolean, done:
722766 else {
723767 args . push ( "-t" , testTimeout ) ;
724768 }
769+ if ( bail ) {
770+ args . push ( "--bail" ) ;
771+ }
725772 args . push ( run ) ;
726773 setNodeEnvToDevelopment ( ) ;
727774 exec ( mocha , args , lintThenFinish , finish ) ;
0 commit comments