mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
add 'emitReverseMapping' task to jakefile
This commit is contained in:
parent
9295a0e357
commit
b3eb9c5e6c
13
Jakefile
13
Jakefile
@ -134,6 +134,7 @@ function concatenateFiles(destinationFile, sourceFiles) {
|
||||
}
|
||||
|
||||
var useDebugMode = false;
|
||||
var emitReverseMapping = false;
|
||||
var generateDeclarations = false;
|
||||
var host = (process.env.host || process.env.TYPESCRIPT_HOST || "node");
|
||||
var compilerFilename = "tsc.js";
|
||||
@ -148,10 +149,14 @@ var compilerFilename = "tsc.js";
|
||||
function compileFile(outFile, sources, prereqs, prefixes, useBuiltCompiler, noOutFile) {
|
||||
file(outFile, prereqs, function() {
|
||||
var dir = useBuiltCompiler ? builtLocalDirectory : LKGDirectory;
|
||||
var options = "-removeComments --module commonjs -noImplicitAny "; //" -propagateEnumConstants "
|
||||
var options = "-removeComments --module commonjs -noImplicitAny ";
|
||||
if (generateDeclarations) {
|
||||
options += "--declaration ";
|
||||
}
|
||||
|
||||
if (emitReverseMapping) {
|
||||
options += "--preserveConstEnums ";
|
||||
}
|
||||
|
||||
var cmd = host + " " + dir + compilerFilename + " " + options + " ";
|
||||
if (useDebugMode) {
|
||||
@ -259,10 +264,14 @@ task("local", ["generate-diagnostics", "lib", tscFile, servicesFile]);
|
||||
|
||||
// Local target to build the compiler and services
|
||||
desc("Emit debug mode files with sourcemaps");
|
||||
task("debug", function() {
|
||||
task("debug", ["emitReverseMapping"], function() {
|
||||
useDebugMode = true;
|
||||
});
|
||||
|
||||
desc("Emit reverse mapping for const enums");
|
||||
task("emitReverseMapping", function() {
|
||||
emitReverseMapping = true;
|
||||
});
|
||||
|
||||
// Set the default task to "local"
|
||||
task("default", ["local"]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user