From 5c7a3d050d62b4b6a9cb65c71f2bfd0e79f06bcf Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 3 Oct 2017 11:18:22 -0700 Subject: [PATCH] Keep comments in production tsserverlibrary builds (#18913) --- Gulpfile.ts | 2 +- Jakefile.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gulpfile.ts b/Gulpfile.ts index 1b095f829d3..1b82d24bcf8 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -505,7 +505,7 @@ const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js") const tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts"); gulp.task(tsserverLibraryFile, /*help*/ false, [servicesFile, typesMapJson], (done) => { - const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({}, /*useBuiltCompiler*/ true)); + const serverLibraryProject = tsc.createProject("src/server/tsconfig.library.json", getCompilerSettings({ removeComments: false }, /*useBuiltCompiler*/ true)); const {js, dts}: { js: NodeJS.ReadableStream, dts: NodeJS.ReadableStream } = serverLibraryProject.src() .pipe(sourcemaps.init()) .pipe(newer(tsserverLibraryFile)) diff --git a/Jakefile.js b/Jakefile.js index fc0a8cfde0d..0d6474fc571 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -647,7 +647,7 @@ compileFile( [builtLocalDirectory, copyright, builtLocalCompiler].concat(languageServiceLibrarySources).concat(libraryTargets), /*prefixes*/[copyright], /*useBuiltCompiler*/ true, - { noOutFile: false, generateDeclarations: true, stripInternal: true, preserveConstEnums: true }, + { noOutFile: false, generateDeclarations: true, stripInternal: true, preserveConstEnums: true, keepComments: true }, /*callback*/ function () { prependFile(copyright, tsserverLibraryDefinitionFile);