(argv)
| 2389 | |
| 2390 | export class Tool extends TOOL { |
| 2391 | constructor(argv) { |
| 2392 | super(argv); |
| 2393 | if (this.currentPlatform == "wasm") { |
| 2394 | this.moddablePath = "/moddable"; |
| 2395 | this.createDirectory(this.moddablePath); |
| 2396 | this.createDirectory(this.moddablePath + "/build"); |
| 2397 | } |
| 2398 | else { |
| 2399 | this.moddablePath = this.getenv("MODDABLE"); |
| 2400 | if (!this.moddablePath) |
| 2401 | throw new Error("MODDABLE: variable not found!"); |
| 2402 | } |
| 2403 | this.config = {}; |
| 2404 | this.debug = false; |
| 2405 | this.xsbugLaunch = "none"; |
| 2406 | this.environment = { "MODDABLE": this.moddablePath } |
| 2407 | this.format = null; |
| 2408 | this.instrument = false; |
| 2409 | this.mainPath = null; |
| 2410 | this.make = false; |
| 2411 | this.manifestPath = null; |
| 2412 | this.outputPath = null; |
| 2413 | this.platform = null; |
| 2414 | this.rotation = undefined; |
| 2415 | this.signature = null; |
| 2416 | this.verbose = false; |
| 2417 | this.windows = this.currentPlatform == "win"; |
| 2418 | this.slash = this.windows ? "\\" : "/"; |
| 2419 | this.escapedHash = this.windows ? "^#" : "\\#"; |
| 2420 | |
| 2421 | this.buildPath = this.moddablePath + this.slash + "build"; |
| 2422 | this.xsPath = this.moddablePath + this.slash + "xs"; |
| 2423 | |
| 2424 | var name, path; |
| 2425 | var argc = argv.length; |
| 2426 | for (var argi = 1; argi < argc; argi++) { |
| 2427 | var option = argv[argi]; |
| 2428 | switch (option) { |
| 2429 | case "-d": |
| 2430 | this.debug = true; |
| 2431 | this.instrument = true; |
| 2432 | this.xsbugLaunch = "default"; |
| 2433 | break; |
| 2434 | case "-dn": |
| 2435 | this.debug = true; |
| 2436 | this.instrument = true; |
| 2437 | this.xsbugLaunch = "none"; |
| 2438 | break; |
| 2439 | case "-dx": |
| 2440 | this.debug = true; |
| 2441 | this.instrument = true; |
| 2442 | this.xsbugLaunch = "app"; |
| 2443 | break; |
| 2444 | case "-dl": |
| 2445 | this.debug = true; |
| 2446 | this.instrument = true; |
| 2447 | this.xsbugLaunch = "log"; |
| 2448 | break; |
nothing calls this directly
no test coverage detected