@@ -23,6 +23,10 @@ else if (process.env.PATH !== undefined) {
2323const host = process . env . TYPESCRIPT_HOST || process . env . host || "node" ;
2424
2525const defaultTestTimeout = 40000 ;
26+ const useBuilt =
27+ process . env . USE_BUILT === "true" ? true :
28+ process . env . LKG === "true" ? false :
29+ false ;
2630
2731let useDebugMode = true ;
2832
@@ -296,7 +300,7 @@ task(TaskNames.buildFoldEnd, [], function () {
296300
297301desc ( "Compiles tslint rules to js" ) ;
298302task ( TaskNames . buildRules , [ ] , function ( ) {
299- tsbuild ( ConfigFileFor . lint , false , ( ) => complete ( ) ) ;
303+ tsbuild ( ConfigFileFor . lint , ! useBuilt , ( ) => complete ( ) ) ;
300304} , { async : true } ) ;
301305
302306desc ( "Cleans the compiler output, declare files, and tests" ) ;
@@ -368,7 +372,7 @@ file(ConfigFileFor.tsserverLibrary, [], function () {
368372// tsserverlibrary.js
369373// tsserverlibrary.d.ts
370374file ( Paths . tsserverLibraryFile , [ TaskNames . coreBuild , ConfigFileFor . tsserverLibrary ] , function ( ) {
371- tsbuild ( ConfigFileFor . tsserverLibrary , false , ( ) => {
375+ tsbuild ( ConfigFileFor . tsserverLibrary , ! useBuilt , ( ) => {
372376 if ( needsUpdate ( [ Paths . tsserverLibraryOutFile , Paths . tsserverLibraryDefinitionOutFile ] , [ Paths . tsserverLibraryFile , Paths . tsserverLibraryDefinitionFile ] ) ) {
373377 const copyright = readFileSync ( Paths . copyright ) ;
374378
@@ -427,7 +431,7 @@ file(ConfigFileFor.typescriptServices, [], function () {
427431// typescriptServices.js
428432// typescriptServices.d.ts
429433file ( Paths . servicesFile , [ TaskNames . coreBuild , ConfigFileFor . typescriptServices ] , function ( ) {
430- tsbuild ( ConfigFileFor . typescriptServices , false , ( ) => {
434+ tsbuild ( ConfigFileFor . typescriptServices , ! useBuilt , ( ) => {
431435 if ( needsUpdate ( [ Paths . servicesOutFile , Paths . servicesDefinitionOutFile ] , [ Paths . servicesFile , Paths . servicesDefinitionFile ] ) ) {
432436 const copyright = readFileSync ( Paths . copyright ) ;
433437
0 commit comments