Copy typesMap.json in produceLKG.ts (#39329)

* Copy typesMap.json in produceLKG.ts

It doesn't change very often and there's a hardcoded backup, but this
seems like a booby trap.

* Remove unused import
This commit is contained in:
Andrew Casey 2020-07-01 13:55:35 -07:00 committed by GitHub
parent f27ff08776
commit 0e3f25d079
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,6 @@
import childProcess = require("child_process");
import fs = require("fs-extra");
import path = require("path");
import removeInternal = require("remove-internal");
import glob = require("glob");
const root = path.join(__dirname, "..");
@ -15,6 +14,7 @@ async function produceLKG() {
console.log(`Building LKG from ${source} to ${dest}`);
await copyLibFiles();
await copyLocalizedDiagnostics();
await copyTypesMap();
await buildProtocol();
await copyScriptOutputs();
await copyDeclarationOutputs();
@ -40,6 +40,10 @@ async function copyLocalizedDiagnostics() {
}
}
async function copyTypesMap() {
await copyFromBuiltLocal("typesMap.json"); // Cannot accommodate copyright header
}
async function buildProtocol() {
const protocolScript = path.join(__dirname, "buildProtocol.js");
if (!fs.existsSync(protocolScript)) {