Skip to content

Commit 0e858a6

Browse files
authored
Include misc script outputs in local build (#30092)
* Include other misc script outputs in local build * Remove comment
1 parent c2f1998 commit 0e858a6

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

Gulpfile.js

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,34 @@ task("lint").flags = {
373373
" --f[iles]=<regex>": "pattern to match files to lint",
374374
};
375375

376+
const buildCancellationToken = () => buildProject("src/cancellationToken");
377+
const cleanCancellationToken = () => cleanProject("src/cancellationToken");
378+
cleanTasks.push(cleanCancellationToken);
379+
380+
const buildTypingsInstaller = () => buildProject("src/typingsInstaller");
381+
const cleanTypingsInstaller = () => cleanProject("src/typingsInstaller");
382+
cleanTasks.push(cleanTypingsInstaller);
383+
384+
const buildWatchGuard = () => buildProject("src/watchGuard");
385+
const cleanWatchGuard = () => cleanProject("src/watchGuard");
386+
cleanTasks.push(cleanWatchGuard);
387+
388+
const generateTypesMap = () => src("src/server/typesMap.json")
389+
.pipe(newer("built/local/typesMap.json"))
390+
.pipe(transform(contents => (JSON.parse(contents), contents))) // validates typesMap.json is valid JSON
391+
.pipe(dest("built/local"));
392+
task("generate-types-map", generateTypesMap);
393+
394+
const cleanTypesMap = () => del("built/local/typesMap.json");
395+
cleanTasks.push(cleanTypesMap);
396+
397+
const buildOtherOutputs = parallel(buildCancellationToken, buildTypingsInstaller, buildWatchGuard, generateTypesMap);
398+
task("other-outputs", series(preBuild, buildOtherOutputs));
399+
task("other-outputs").description = "Builds miscelaneous scripts and documents distributed with the LKG";
400+
376401
const buildFoldStart = async () => { if (fold.isTravis()) console.log(fold.start("build")); };
377402
const buildFoldEnd = async () => { if (fold.isTravis()) console.log(fold.end("build")); };
378-
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl), buildFoldEnd));
403+
task("local", series(buildFoldStart, preBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs), buildFoldEnd));
379404
task("local").description = "Builds the full compiler and services";
380405
task("local").flags = {
381406
" --built": "Compile using the built version of the compiler."
@@ -551,28 +576,6 @@ const buildReleaseTsc = () => buildProject("src/tsc/tsconfig.release.json");
551576
const cleanReleaseTsc = () => cleanProject("src/tsc/tsconfig.release.json");
552577
cleanTasks.push(cleanReleaseTsc);
553578

554-
const buildCancellationToken = () => buildProject("src/cancellationToken");
555-
const cleanCancellationToken = () => cleanProject("src/cancellationToken");
556-
cleanTasks.push(cleanCancellationToken);
557-
558-
const buildTypingsInstaller = () => buildProject("src/typingsInstaller");
559-
const cleanTypingsInstaller = () => cleanProject("src/typingsInstaller");
560-
cleanTasks.push(cleanTypingsInstaller);
561-
562-
const buildWatchGuard = () => buildProject("src/watchGuard");
563-
const cleanWatchGuard = () => cleanProject("src/watchGuard");
564-
cleanTasks.push(cleanWatchGuard);
565-
566-
// TODO(rbuckton): This task isn't triggered by any other task. Is it still needed?
567-
const generateTypesMap = () => src("src/server/typesMap.json")
568-
.pipe(newer("built/local/typesMap.json"))
569-
.pipe(transform(contents => (JSON.parse(contents), contents))) // validates typesMap.json is valid JSON
570-
.pipe(dest("built/local"));
571-
task("generate-types-map", generateTypesMap);
572-
573-
const cleanTypesMap = () => del("built/local/typesMap.json");
574-
cleanTasks.push(cleanTypesMap);
575-
576579
const cleanBuilt = () => del("built");
577580

578581
const produceLKG = async () => {
@@ -602,7 +605,7 @@ const produceLKG = async () => {
602605
}
603606
};
604607

605-
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildCancellationToken, buildTypingsInstaller, buildWatchGuard, buildReleaseTsc), produceLKG));
608+
task("LKG", series(lkgPreBuild, parallel(localize, buildTsc, buildServer, buildServices, buildLssl, buildOtherOutputs, buildReleaseTsc), produceLKG));
606609
task("LKG").description = "Makes a new LKG out of the built js files";
607610
task("LKG").flags = {
608611
" --built": "Compile using the built version of the compiler.",

0 commit comments

Comments
 (0)