Skip to content

Commit 9051bc9

Browse files
committed
use debug mode by defauls in local builds
1 parent 95ec8c0 commit 9051bc9

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

Jakefile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,7 @@ function concatenateFiles(destinationFile, sourceFiles) {
133133
fs.renameSync(temp, destinationFile);
134134
}
135135

136-
var useDebugMode = false;
137-
var emitReverseMapping = false;
136+
var useDebugMode = true;
138137
var generateDeclarations = false;
139138
var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node");
140139
var compilerFilename = "tsc.js";
@@ -154,14 +153,11 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
154153
options += "--declaration ";
155154
}
156155

157-
if (emitReverseMapping) {
156+
if (useDebugMode) {
158157
options += "--preserveConstEnums ";
159158
}
160159

161160
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
162-
if (useDebugMode) {
163-
cmd = cmd + " " + path.join(harnessDirectory, "external/es5compat.ts") + " " + path.join(harnessDirectory, "external/json2.ts") + " ";
164-
}
165161
cmd = cmd + sources.join(" ") + (!noOutFile ? " -out " + outFile : "");
166162
if (useDebugMode) {
167163
cmd = cmd + " -sourcemap -mapRoot file:///" + path.resolve(path.dirname(outFile));
@@ -263,14 +259,9 @@ task("local", ["generate-diagnostics", "lib", tscFile, servicesFile]);
263259

264260

265261
// Local target to build the compiler and services
266-
desc("Emit debug mode files with sourcemaps");
267-
task("debug", ["emitReverseMapping"], function() {
268-
useDebugMode = true;
269-
});
270-
271-
desc("Emit reverse mapping for const enums");
272-
task("emitReverseMapping", function() {
273-
emitReverseMapping = true;
262+
desc("Sets release mode flag");
263+
task("release", function() {
264+
useDebugMode = false;
274265
});
275266

276267
// Set the default task to "local"
@@ -321,7 +312,7 @@ task("generate-spec", [specMd])
321312

322313
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
323314
desc("Makes a new LKG out of the built js files");
324-
task("LKG", libraryTargets, function() {
315+
task("LKG", ["clean", "release", "local"].concat(libraryTargets), function() {
325316
var expectedFiles = [tscFile, servicesFile].concat(libraryTargets);
326317
var missingFiles = expectedFiles.filter(function (f) {
327318
return !fs.existsSync(f);

0 commit comments

Comments
 (0)