Fix up some of the ignore files, and removing the create language service script (#33684)

* Fix up some of the ignore files, and removing the create script

* Update .dockerignore
This commit is contained in:
Orta 2019-11-06 11:11:29 -05:00 committed by GitHub
parent 1c42c1aaa8
commit b9fe84e591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 48 deletions

View file

@ -22,7 +22,6 @@ scripts/buildProtocol.js
scripts/ior.js
scripts/authors.js
scripts/configurePrerelease.js
scripts/configureTSCBuild.js
scripts/open-user-pr.js
scripts/open-cherry-pick-pr.js
scripts/processDiagnosticMessages.d.ts
@ -30,6 +29,7 @@ scripts/processDiagnosticMessages.js
scripts/produceLKG.js
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
scripts/generateLocalizedDiagnosticMessages.js
scripts/configureLanguageServiceBuild.js
scripts/*.js.map
scripts/typings/
coverage/

1
.gitignore vendored
View file

@ -46,7 +46,6 @@ scripts/ior.js
scripts/authors.js
scripts/configurePrerelease.js
scripts/configureLanguageServiceBuild.js
scripts/createLanguageServiceBuild.js
scripts/open-user-pr.js
scripts/open-cherry-pick-pr.js
scripts/processDiagnosticMessages.d.ts

View file

@ -1,46 +0,0 @@
/// <reference types="node"/>
import { join } from "path";
import { readFileSync, unlinkSync } from "fs";
import { tmpdir } from "os";
import { execSync, ExecSyncOptions } from "child_process";
import chalk from "chalk";
interface PackageJson {
name: string;
version: string
}
const exec = (cmd: string, opts?: ExecSyncOptions) => {
console.log(chalk.gray(`> ${cmd} ${opts ? JSON.stringify(opts) : ""}`));
execSync(cmd, opts);
};
const step = (msg: string) => {
console.log("\n\n" + chalk.bold("- ") + msg);
};
function main(): void {
console.log(chalk.bold("## Creating the language services build of TypeScript"));
process.stdout.write(chalk.grey("> node /scripts/createLanguageServiceBuild.ts"));
// Create a tarball of the current version
step("Packing the current TypeScript via npm.");
exec("npm pack");
const packageJsonValue: PackageJson = JSON.parse(readFileSync("package.json", "utf8"));
const tarballFileName = `${packageJsonValue.name}-${packageJsonValue.version}.tgz`;
const unzipDir = tmpdir();
step(`Extracting the built version into a temporary folder. ${unzipDir}/package`);
exec(`tar -xvzf ${tarballFileName} -C ${unzipDir}`);
unlinkSync(tarballFileName);
step(`Updating the build metadata`);
const packagePath = join(unzipDir, "package");
exec(`node scripts/configureLanguageServiceBuild.js ${join(packagePath, "package.json")}`);
step(`Deploying the language service`);
exec("npm publish --access public", { cwd: packagePath });
}
main();