lib/qx/tool/cli/commands/Compile.js
async function() {
      if (this.argv["machine-readable"]) {
        qx.tool.compiler.Console.getInstance().setMachineReadable(true);
      } else if (this.argv["feedback"]) {
        this.__gauge = new Gauge();
        this.__gauge.show("Compiling", 0);
        const TYPES = {
          "error": "ERROR",
          "warning": "Warning"
        };
        qx.tool.compiler.Console.getInstance().setWriter((str, msgId) => {
          msgId = qx.tool.compiler.Console.MESSAGE_IDS[msgId];
          if (msgId.type !== "message") {
            this.__gauge.hide();
            console.log(TYPES[msgId.type] + ": " + str);
            this.__gauge.show();
          } else {
            this.__gauge.show(str);
          }
        });
      }

      var config = this.__config = await this.parse(this.argv);
      if (!config) {
        throw new qx.tool.cli.Utils.UserError("Error: Cannot find any configuration");
      }
      var maker = this.__maker = await this.createMakerFromConfig(config);
      if (!maker) {
        throw new qx.tool.cli.Utils.UserError("Error: Cannot find anything to make");
      }

      let errors = await this.__checkDependencies(maker, config.contribs);
      if (errors.length > 0) {
        if (this.argv.warnAsError) {
          throw new qx.tool.cli.Utils.UserError(errors.join("\n"));
        } else {
          console.log(errors.join("\n"));
        }
      }

      if (this.argv["clean"]) {
        await maker.eraseOutputDir();
        await qx.tool.compiler.files.Utils.safeUnlink(maker.getAnalyser().getDbFilename());
        await qx.tool.compiler.files.Utils.safeUnlink(maker.getAnalyser().getResDbFilename());
      }
      var analyser = maker.getAnalyser();
      var target = maker.getTarget();
      if (this.__gauge) {
        maker.addListener("writingApplications", () => this.__gauge.show("Writing Applications", 0));
        maker.addListener("writtenApplications", () => this.__gauge.show("Writing Applications", 1));
        maker.addListener("writingApplication", evt => this.__gauge.pulse("Writing Application " + evt.getData().getName()));
        analyser.addListener("compilingClass", evt => this.__gauge.pulse("Compiling " + evt.getData().classFile.getClassName()));
        if (target instanceof qx.tool.compiler.targets.BuildTarget) {
          target.addListener("minifyingApplication", evt => this.__gauge.pulse("Minifying " + evt.getData().application.getName() + " " + evt.getData().filename));
        }
      } else {
        maker.addListener("writingApplication", evt => qx.tool.compiler.Console.print("qx.tool.cli.compile.writingApplication", evt.getData().getName()));
        if (target instanceof qx.tool.compiler.targets.BuildTarget) {
          target.addListener("minifyingApplication", evt => qx.tool.compiler.Console.print("qx.tool.cli.compile.minifyingApplication", evt.getData().application.getName(), evt.getData().filename));
        }
        if (this.argv.verbose) {
          var startTimes = {};
          analyser.addListener("compilingClass", evt => {
            var classname = evt.getData().classFile.getClassName();
            startTimes[classname] = new Date();
            qx.tool.compiler.Console.print("qx.tool.cli.compile.compilingClass", classname);
          });
          analyser.addListener("compiledClass", evt => {
            var classname = evt.getData().classFile.getClassName();
            var startTime = startTimes[classname];
            var endTime = new Date();
            var diff = endTime.getTime() - startTime.getTime();
            qx.tool.compiler.Console.print("qx.tool.cli.compile.compiledClass", classname, qx.tool.cli.Utils.formatTime(diff));
          });
        }
      }
      maker.addListener("writingApplications", e => this.dispatchEvent(e.clone()));
      maker.addListener("writtenApplications", e => {
        this.dispatchEvent(e.clone());
        if (this.argv.verbose) {
          console.log("\nCompleted all applications, libraries used are:");
          maker.getAnalyser().getLibraries().forEach(lib => {
            console.log(`   ${lib.getNamespace()} (${lib.getRootDir()})`);
          });
        }
      });
      maker.addListener("writingApplication", e => this.dispatchEvent(e.clone()));
      maker.addListener("writtenApplication", e => this.dispatchEvent(e.clone()));
      analyser.addListener("compilingClass", e => this.dispatchEvent(e.clone()));
      analyser.addListener("compiledClass", e => this.dispatchEvent(e.clone()));
      analyser.addListener("saveDatabase", e => this.dispatchEvent(e.clone()));
      target.addListener("checkEnvironment", e => this.dispatchEvent(e.clone()));

      var p = qx.tool.compiler.files.Utils.safeStat("source/index.html")
        .then(stat => stat && qx.tool.compiler.Console.print("qx.tool.cli.compile.legacyFiles", "source/index.html"));

      // Simple one of make
      if (!this.argv.watch) {
        return p.then(() => {
          this.fireEvent("making");
          maker.addListener("writtenApplications", e => this.fireEvent("made"));
          return maker.make()
            .then(() => {
              if (this.__gauge) {
                this.__gauge.show("Compiling", 1);
              }
            });
        });
      }

      // Continuous make
      let watch = new qx.tool.cli.Watch(maker);
      watch.addListener("making", e => this.dispatchEvent(e.clone()));
      watch.addListener("remaking", e => this.dispatchEvent(e.clone()));
      watch.addListener("made", e => this.dispatchEvent(e.clone()));
      return p.then(() => watch.start());
    }
async function() {
      if (this.argv["machine-readable"]) {
        qx.tool.compiler.Console.getInstance().setMachineReadable(true);
      } else if (this.argv["feedback"]) {
        this.__gauge = new Gauge();
        this.__gauge.show("Compiling", 0);
        const TYPES = {
          "error": "ERROR",
          "warning": "Warning"
        };
        qx.tool.compiler.Console.getInstance().setWriter((str, msgId) => {
          msgId = qx.tool.compiler.Console.MESSAGE_IDS[msgId];
          if (msgId.type !== "message") {
            this.__gauge.hide();
            console.log(TYPES[msgId.type] + ": " + str);
            this.__gauge.show();
          } else {
            this.__gauge.show(str);
          }
        });
      }

      var config = this.__config = await this.parse(this.argv);
      if (!config) {
        throw new qx.tool.cli.Utils.UserError("Error: Cannot find any configuration");
      }
      var maker = this.__maker = await this.createMakerFromConfig(config);
      if (!maker) {
        throw new qx.tool.cli.Utils.UserError("Error: Cannot find anything to make");
      }

      let errors = await this.__checkDependencies(maker, config.contribs);
      if (errors.length > 0) {
        if (this.argv.warnAsError) {
          throw new qx.tool.cli.Utils.UserError(errors.join("\n"));
        } else {
          console.log(errors.join("\n"));
        }
      }

      if (this.argv["clean"]) {
        await maker.eraseOutputDir();
        await qx.tool.compiler.files.Utils.safeUnlink(maker.getAnalyser().getDbFilename());
        await qx.tool.compiler.files.Utils.safeUnlink(maker.getAnalyser().getResDbFilename());
      }
      var analyser = maker.getAnalyser();
      var target = maker.getTarget();
      if (this.__gauge) {
        maker.addListener("writingApplications", () => this.__gauge.show("Writing Applications", 0));
        maker.addListener("writtenApplications", () => this.__gauge.show("Writing Applications", 1));
        maker.addListener("writingApplication", evt => this.__gauge.pulse("Writing Application " + evt.getData().getName()));
        analyser.addListener("compilingClass", evt => this.__gauge.pulse("Compiling " + evt.getData().classFile.getClassName()));
        if (target instanceof qx.tool.compiler.targets.BuildTarget) {
          target.addListener("minifyingApplication", evt => this.__gauge.pulse("Minifying " + evt.getData().application.getName() + " " + evt.getData().filename));
        }
      } else {
        maker.addListener("writingApplication", evt => qx.tool.compiler.Console.print("qx.tool.cli.compile.writingApplication", evt.getData().getName()));
        if (target instanceof qx.tool.compiler.targets.BuildTarget) {
          target.addListener("minifyingApplication", evt => qx.tool.compiler.Console.print("qx.tool.cli.compile.minifyingApplication", evt.getData().application.getName(), evt.getData().filename));
        }
        if (this.argv.verbose) {
          var startTimes = {};
          analyser.addListener("compilingClass", evt => {
            var classname = evt.getData().classFile.getClassName();
            startTimes[classname] = new Date();
            qx.tool.compiler.Console.print("qx.tool.cli.compile.compilingClass", classname);
          });
          analyser.addListener("compiledClass", evt => {
            var classname = evt.getData().classFile.getClassName();
            var startTime = startTimes[classname];
            var endTime = new Date();
            var diff = endTime.getTime() - startTime.getTime();
            qx.tool.compiler.Console.print("qx.tool.cli.compile.compiledClass", classname, qx.tool.cli.Utils.formatTime(diff));
          });
        }
      }
      maker.addListener("writingApplications", e => this.dispatchEvent(e.clone()));
      maker.addListener("writtenApplications", e => {
        this.dispatchEvent(e.clone());
        if (this.argv.verbose) {
          console.log("\nCompleted all applications, libraries used are:");
          maker.getAnalyser().getLibraries().forEach(lib => {
            console.log(`   ${lib.getNamespace()} (${lib.getRootDir()})`);
          });
        }
      });
      maker.addListener("writingApplication", e => this.dispatchEvent(e.clone()));
      maker.addListener("writtenApplication", e => this.dispatchEvent(e.clone()));
      analyser.addListener("compilingClass", e => this.dispatchEvent(e.clone()));
      analyser.addListener("compiledClass", e => this.dispatchEvent(e.clone()));
      analyser.addListener("saveDatabase", e => this.dispatchEvent(e.clone()));
      target.addListener("checkEnvironment", e => this.dispatchEvent(e.clone()));

      var p = qx.tool.compiler.files.Utils.safeStat("source/index.html")
        .then(stat => stat && qx.tool.compiler.Console.print("qx.tool.cli.compile.legacyFiles", "source/index.html"));

      // Simple one of make
      if (!this.argv.watch) {
        return p.then(() => {
          this.fireEvent("making");
          maker.addListener("writtenApplications", e => this.fireEvent("made"));
          return maker.make()
            .then(() => {
              if (this.__gauge) {
                this.__gauge.show("Compiling", 1);
              }
            });
        });
      }

      // Continuous make
      let watch = new qx.tool.cli.Watch(maker);
      watch.addListener("making", e => this.dispatchEvent(e.clone()));
      watch.addListener("remaking", e => this.dispatchEvent(e.clone()));
      watch.addListener("made", e => this.dispatchEvent(e.clone()));
      return p.then(() => watch.start());
    }
/*
@Override