renamed debug -> sourceMap

This commit is contained in:
Renaud Pawlak 2015-12-18 16:28:52 +01:00
parent d22b3780f0
commit 12e19a3bb5
2 changed files with 291 additions and 292 deletions

View File

@ -108,7 +108,7 @@ public class JSweetCommandLineLauncher {
}
logger.info("bundles directory: " + bundlesDirectory);
transpiler.setBundlesDirectory(bundlesDirectory);
transpiler.setPreserveSourceLineNumbers(jsapArgs.getBoolean("debug"));
transpiler.setPreserveSourceLineNumbers(jsapArgs.getBoolean("sourceMap"));
transpiler.setModuleKind(ModuleKind.valueOf(jsapArgs.getString("module")));
transpiler.setEncoding(jsapArgs.getString("encoding"));
transpiler.setIgnoreAssertions(jsapArgs.getBoolean("ignoreAssertions"));
@ -246,11 +246,10 @@ public class JSweetCommandLineLauncher {
jsap.registerParameter(optionArg);
// Debug
switchArg = new Switch("debug");
switchArg.setLongFlag("debug");
switchArg.setShortFlag('d');
switchArg = new Switch("sourceMap");
switchArg.setLongFlag("sourceMap");
switchArg.setHelp(
"Set the transpiler to debug mode. In debug mode, source map files are generated so that it is possible to debug them in the browser. This feature is not available yet when using the --module option.");
"Set the transpiler to generate source map files for the Java files, so that it is possible to debug them in the browser. This feature is not available yet when using the --module option. Currently, when this option is on, the generated TypeScript file is not pretty printed in a programmer-friendly way (disable it in order to generate readable TypeScript code).");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);

View File

@ -922,7 +922,7 @@ public class JSweetTranspiler {
args.add("--watch");
}
if (isPreserveSourceLineNumbers()) {
args.add("--sourcemap");
args.add("--sourceMap");
}
args.addAll(asList("--rootDir", tsOutputDir.getAbsolutePath()));