@@ -611,57 +611,23 @@ gulp.task("LKG", "Makes a new LKG out of the built js files", ["clean", "dontUse
611611 return runSequence ( "LKGInternal" , "VerifyLKG" ) ;
612612} ) ;
613613
614- gulp . task ( "typemock" , ( ) => {
615- const project = tsc . createProject ( " scripts/typemock /tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
614+ function compilePrivatePackage ( packageName ) {
615+ const project = tsc . createProject ( ` scripts/${ packageName } /tsconfig.json` , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
616616 return project . src ( )
617617 . pipe ( sourcemaps . init ( ) )
618- . pipe ( newer ( " scripts/typemock /dist/index.js" ) )
618+ . pipe ( newer ( ` scripts/${ packageName } /dist/index.js` ) )
619619 . pipe ( project ( ) )
620- . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/typemock/dist" } ) )
621- . pipe ( gulp . dest ( "scripts/typemock/dist" ) ) ;
622- } ) ;
623-
624- gulp . task ( "vfs-core" , ( ) => {
625- const project = tsc . createProject ( "scripts/vfs-core/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
626- return project . src ( )
627- . pipe ( sourcemaps . init ( ) )
628- . pipe ( newer ( "scripts/vfs-core/dist/index.js" ) )
629- . pipe ( project ( ) )
630- . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs-core/dist" } ) )
631- . pipe ( gulp . dest ( "scripts/vfs-core/dist" ) ) ;
632- } ) ;
633-
634- gulp . task ( "vfs-errors" , ( ) => {
635- const project = tsc . createProject ( "scripts/vfs-errors/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
636- return project . src ( )
637- . pipe ( sourcemaps . init ( ) )
638- . pipe ( newer ( "scripts/vfs-errors/dist/index.js" ) )
639- . pipe ( project ( ) )
640- . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs-errors/dist" } ) )
641- . pipe ( gulp . dest ( "scripts/vfs-errors/dist" ) ) ;
642- } ) ;
643-
644- gulp . task ( "vfs-path" , [ "vfs-core" , "vfs-errors" ] , ( ) => {
645- const project = tsc . createProject ( "scripts/vfs-path/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
646- return project . src ( )
647- . pipe ( sourcemaps . init ( ) )
648- . pipe ( newer ( "scripts/vfs-path/dist/index.js" ) )
649- . pipe ( project ( ) )
650- . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs-path/dist" } ) )
651- . pipe ( gulp . dest ( "scripts/vfs-path/dist" ) ) ;
652- } ) ;
653-
654- gulp . task ( "vfs" , [ "vfs-core" , "vfs-errors" , "vfs-path" ] , ( ) => {
655- const project = tsc . createProject ( "scripts/vfs/tsconfig.json" , getCompilerSettings ( { } , /*useBuiltCompiler*/ false ) ) ;
656- return project . src ( )
657- . pipe ( sourcemaps . init ( ) )
658- . pipe ( newer ( "scripts/vfs/dist/index.js" ) )
659- . pipe ( project ( ) )
660- . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : "scripts/vfs/dist" } ) )
661- . pipe ( gulp . dest ( "scripts/vfs/dist" ) ) ;
662- } ) ;
620+ . pipe ( sourcemaps . write ( "." , < any > { sourceRoot : "../src" , includeContent : false , destPath : `scripts/${ packageName } /dist` } ) )
621+ . pipe ( gulp . dest ( `scripts/${ packageName } /dist` ) ) ;
622+ }
663623
664- gulp . task ( "private-packages" , [ "typemock" , "vfs" ] ) ;
624+ gulp . task ( "typemock" , ( ) => compilePrivatePackage ( "typemock" ) ) ;
625+ gulp . task ( "vfs-core" , ( ) => compilePrivatePackage ( "vfs-core" ) ) ;
626+ gulp . task ( "vfs-errors" , ( ) => compilePrivatePackage ( "vfs-errors" ) ) ;
627+ gulp . task ( "vfs-path" , [ "vfs-core" , "vfs-errors" ] , ( ) => compilePrivatePackage ( "vfs-path" ) ) ;
628+ gulp . task ( "vfs" , [ "vfs-core" , "vfs-errors" , "vfs-path" , "typemock" ] , ( ) => compilePrivatePackage ( "vfs" ) ) ;
629+ gulp . task ( "harness-core" , [ "vfs-core" ] , ( ) => compilePrivatePackage ( "harness-core" ) ) ;
630+ gulp . task ( "private-packages" , [ "typemock" , "vfs" , "harness-core" ] ) ;
665631
666632// Task to build the tests infrastructure using the built compiler
667633const run = path . join ( builtLocalDirectory , "run.js" ) ;
0 commit comments