How to use the gauge/themes.newTheme function in gauge

To help you get started, we’ve selected a few gauge examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github qooxdoo / qooxdoo-compiler / source / class / qx / tool / cli / commands / Compile.js View on Github external
qx.tool.compiler.Console.getInstance().setMachineReadable(true);
      } else {
        let configDb = await qx.tool.cli.ConfigDb.getInstance();
        let color = configDb.db("qx.default.color", null);
        if (color) {
          let colorOn = consoleControl.color(color.split(" "));
          process.stdout.write(colorOn + consoleControl.eraseLine());
          let colorReset = consoleControl.color("reset");
          process.on("exit", () => process.stdout.write(colorReset + consoleControl.eraseLine()));
          let Console = qx.tool.compiler.Console.getInstance();
          Console.setColorOn(colorOn);
        }

        if (this.argv["feedback"]) {
          var themes = require("gauge/themes");
          var ourTheme = themes.newTheme(themes({hasUnicode: true, hasColor: true}));
          let colorOn = qx.tool.compiler.Console.getInstance().getColorOn();
          ourTheme.preProgressbar = colorOn + ourTheme.preProgressbar;
          ourTheme.preSubsection = colorOn + ourTheme.preSubsection;
          ourTheme.progressbarTheme.postComplete += colorOn;
          ourTheme.progressbarTheme.postRemaining += colorOn;

          this.__gauge = new Gauge();
          this.__gauge.setTheme(ourTheme);
          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") {

gauge

A terminal based horizontal gauge

ISC
Latest version published 5 months ago

Package Health Score

64 / 100
Full package analysis