How to use the console-control-strings.eraseLine function in console-control-strings

To help you get started, we’ve selected a few console-control-strings 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
process: async function() {
      await this.base(arguments);

      let configDb = await qx.tool.cli.ConfigDb.getInstance();
      if (this.argv["feedback"] === null) {
        this.argv["feedback"] = configDb.db("qx.default.feedback", true);
      }

      if (this.argv["machine-readable"]) {
        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();
github npm / gauge / plumbing.js View on Github external
Plumbing.prototype.show = function (status) {
  var values = Object.create(this.theme)
  for (var key in status) {
    values[key] = status[key]
  }

  return renderTemplate(this.width, this.template, values).trim() +
         consoleControl.color('reset') +
         consoleControl.eraseLine() + consoleControl.gotoSOL()
}
github Andyliwr / FE-learning-load / task08 / lidikang / styles / node_modules / gauge / plumbing.js View on Github external
Plumbing.prototype.hide = function () {
  return consoleControl.gotoSOL() + consoleControl.eraseLine()
}
github GoogleContainerTools / kpt / docsy / node_modules / fsevents / node_modules / gauge / plumbing.js View on Github external
Plumbing.prototype.hide = function () {
  return consoleControl.gotoSOL() + consoleControl.eraseLine()
}

console-control-strings

A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.

ISC
Latest version published 8 years ago

Package Health Score

65 / 100
Full package analysis

Similar packages