Merge pull request #2572 from Microsoft/seriouslyWhyWouldntYouWantComments

Keep comments in debug builds.
This commit is contained in:
Daniel Rosenwasser 2015-03-31 18:34:31 -07:00
commit 03a1542845

View file

@ -222,15 +222,17 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory; var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
var options = "--module commonjs -noImplicitAny"; var options = "--module commonjs -noImplicitAny";
if (!keepComments) { // Keep comments when specifically requested
options += " -removeComments"; // or when in debug mode.
if (!(keepComments || useDebugMode)) {
options += " --removeComments";
} }
if (generateDeclarations) { if (generateDeclarations) {
options += " --declaration"; options += " --declaration";
} }
if (useDebugMode || preserveConstEnums) { if (preserveConstEnums || useDebugMode) {
options += " --preserveConstEnums"; options += " --preserveConstEnums";
} }