Convert gulp processDiagnostics builder to project compilation

This commit is contained in:
Ryan Cavanaugh 2018-04-16 13:53:30 -07:00
parent aac9ef5e51
commit 5ce6b6a2ae

View File

@ -362,20 +362,11 @@ const builtGeneratedDiagnosticMessagesJSON = path.join(builtLocalDirectory, "dia
// processDiagnosticMessages script
gulp.task(processDiagnosticMessagesJs, /*help*/ false, [], () => {
const settings: tsc.Settings = getCompilerSettings({
target: "es5",
declaration: false,
removeComments: true,
noResolve: false,
stripInternal: false,
outFile: processDiagnosticMessagesJs
}, /*useBuiltCompiler*/ false);
return gulp.src(processDiagnosticMessagesTs)
const diagsProject = tsc.createProject('./scripts/processDiagnosticMessages.tsconfig.json');
return diagsProject.src()
.pipe(newer(processDiagnosticMessagesJs))
.pipe(sourcemaps.init())
.pipe(tsc(settings))
.pipe(sourcemaps.write("."))
.pipe(gulp.dest("."));
.pipe(diagsProject())
.pipe(gulp.dest(scriptsDirectory));
});
// The generated diagnostics map; built for the compiler and for the "generate-diagnostics" task