Skip to content

Commit 03a1542

Browse files
Merge pull request #2572 from Microsoft/seriouslyWhyWouldntYouWantComments
Keep comments in debug builds.
2 parents adad7c1 + 27f6f8f commit 03a1542

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Jakefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,17 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
222222
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
223223
var options = "--module commonjs -noImplicitAny";
224224

225-
if (!keepComments) {
226-
options += " -removeComments";
225+
// Keep comments when specifically requested
226+
// or when in debug mode.
227+
if (!(keepComments || useDebugMode)) {
228+
options += " --removeComments";
227229
}
228230

229231
if (generateDeclarations) {
230232
options += " --declaration";
231233
}
232234

233-
if (useDebugMode || preserveConstEnums) {
235+
if (preserveConstEnums || useDebugMode) {
234236
options += " --preserveConstEnums";
235237
}
236238

0 commit comments

Comments
 (0)