@@ -133,8 +133,7 @@ function concatenateFiles(destinationFile, sourceFiles) {
133
133
fs . renameSync ( temp , destinationFile ) ;
134
134
}
135
135
136
- var useDebugMode = false ;
137
- var emitReverseMapping = false ;
136
+ var useDebugMode = true ;
138
137
var generateDeclarations = false ;
139
138
var host = ( process . env . host || process . env . TYPESCRIPT_HOST || "node" ) ;
140
139
var compilerFilename = "tsc.js" ;
@@ -154,14 +153,11 @@ function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOu
154
153
options += "--declaration " ;
155
154
}
156
155
157
- if ( emitReverseMapping ) {
156
+ if ( useDebugMode ) {
158
157
options += "--preserveConstEnums " ;
159
158
}
160
159
161
160
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
- }
165
161
cmd = cmd + sources . join ( " " ) + ( ! noOutFile ? " -out " + outFile : "" ) ;
166
162
if ( useDebugMode ) {
167
163
cmd = cmd + " -sourcemap -mapRoot file:///" + path . resolve ( path . dirname ( outFile ) ) ;
@@ -263,14 +259,9 @@ task("local", ["generate-diagnostics", "lib", tscFile, servicesFile]);
263
259
264
260
265
261
// 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 ;
274
265
} ) ;
275
266
276
267
// Set the default task to "local"
@@ -321,7 +312,7 @@ task("generate-spec", [specMd])
321
312
322
313
// Makes a new LKG. This target does not build anything, but errors if not all the outputs are present in the built/local directory
323
314
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 ( ) {
325
316
var expectedFiles = [ tscFile , servicesFile ] . concat ( libraryTargets ) ;
326
317
var missingFiles = expectedFiles . filter ( function ( f ) {
327
318
return ! fs . existsSync ( f ) ;
0 commit comments