How to use are-we-there-yet - 10 common examples

To help you get started, we’ve selected a few are-we-there-yet 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 GoogleContainerTools / kpt / docsy / node_modules / fsevents / node_modules / npmlog / log.js View on Github external
// default level
log.level = 'info'

log.gauge = new Gauge(stream, {
  enabled: false, // no progress bars unless asked
  theme: {hasColor: log.useColor()},
  template: [
    {type: 'progressbar', length: 20},
    {type: 'activityIndicator', kerning: 1, length: 1},
    {type: 'section', default: ''},
    ':',
    {type: 'logline', kerning: 1, default: ''}
  ]
})

log.tracker = new Progress.TrackerGroup()

// we track this separately as we may need to temporarily disable the
// display of the status bar for our own loggy purposes.
log.progressEnabled = log.gauge.isEnabled()

var unicodeEnabled

log.enableUnicode = function () {
  unicodeEnabled = true
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}

log.disableUnicode = function () {
  unicodeEnabled = false
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}
github npm / npmlog / log.js View on Github external
// default level
log.level = 'info'

log.gauge = new Gauge(stream, {
  enabled: false, // no progress bars unless asked
  theme: {hasColor: log.useColor()},
  template: [
    {type: 'progressbar', length: 20},
    {type: 'activityIndicator', kerning: 1, length: 1},
    {type: 'section', default: ''},
    ':',
    {type: 'logline', kerning: 1, default: ''}
  ]
})

log.tracker = new Progress.TrackerGroup()

// we track this separately as we may need to temporarily disable the
// display of the status bar for our own loggy purposes.
log.progressEnabled = log.gauge.isEnabled()

var unicodeEnabled

log.enableUnicode = function () {
  unicodeEnabled = true
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}

log.disableUnicode = function () {
  unicodeEnabled = false
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}
github Andyliwr / FE-learning-load / task08 / lidikang / styles / node_modules / node-gyp / node_modules / npmlog / log.js View on Github external
// default level
log.level = 'info'

log.gauge = new Gauge(stream, {
  theme: {hasColor: log.useColor()},
  template: [
    {type: 'progressbar', length: 20},
    {type: 'activityIndicator', kerning: 1, length: 1},
    {type: 'section', default: ''},
    ':',
    {type: 'logline', kerning: 1, default: ''}
  ]
})

log.tracker = new Progress.TrackerGroup()

// no progress bars unless asked
log.progressEnabled = false

var unicodeEnabled

log.enableUnicode = function () {
  unicodeEnabled = true
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}

log.disableUnicode = function () {
  unicodeEnabled = false
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}
github sx1989827 / DOClever / Desktop / node_modules / fsevents / node_modules / npmlog / log.js View on Github external
// default level
log.level = 'info'

log.gauge = new Gauge(stream, {
  enabled: false, // no progress bars unless asked
  theme: {hasColor: log.useColor()},
  template: [
    {type: 'progressbar', length: 20},
    {type: 'activityIndicator', kerning: 1, length: 1},
    {type: 'section', default: ''},
    ':',
    {type: 'logline', kerning: 1, default: ''}
  ]
})

log.tracker = new Progress.TrackerGroup()

// we track this separately as we may need to temporarily disable the
// display of the status bar for our own loggy purposes.
log.progressEnabled = log.gauge.isEnabled()

var unicodeEnabled

log.enableUnicode = function () {
  unicodeEnabled = true
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}

log.disableUnicode = function () {
  unicodeEnabled = false
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}
github graalvm / graaljs / deps / npm / node_modules / npmlog / log.js View on Github external
// default level
log.level = 'info'

log.gauge = new Gauge(stream, {
  theme: {hasColor: log.useColor()},
  template: [
    {type: 'progressbar', length: 20},
    {type: 'activityIndicator', kerning: 1, length: 1},
    {type: 'section', default: ''},
    ':',
    {type: 'logline', kerning: 1, default: ''}
  ]
})

log.tracker = new Progress.TrackerGroup()

// no progress bars unless asked
log.progressEnabled = false

var unicodeEnabled

log.enableUnicode = function () {
  unicodeEnabled = true
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}

log.disableUnicode = function () {
  unicodeEnabled = false
  this.gauge.setTheme({hasColor: this.useColor(), hasUnicode: unicodeEnabled})
}
github appcelerator / titanium_mobile / node_modules / sqlite3 / node_modules / node-pre-gyp / node_modules / npmlog / log.js View on Github external
// by default, let ansi decide based on tty-ness.
var colorEnabled = undefined
log.enableColor = function () {
  colorEnabled = true
  this.cursor.enabled = true
}
log.disableColor = function () {
  colorEnabled = false
  this.cursor.enabled = false
}

// default level
log.level = 'info'

log.gauge = new Gauge(log.cursor)
log.tracker = new Progress.TrackerGroup()

// no progress bars unless asked
log.progressEnabled = false

var gaugeTheme = undefined

log.enableUnicode = function () {
  gaugeTheme = Gauge.unicode
  log.gauge.setTheme(gaugeTheme)
}

log.disableUnicode = function () {
  gaugeTheme = Gauge.ascii
  log.gauge.setTheme(gaugeTheme)
}
github DefinitelyTyped / DefinitelyTyped / types / are-we-there-yet / are-we-there-yet-tests.ts View on Github external
import { Tracker, TrackerStream, TrackerGroup } from "are-we-there-yet";

const simple = new Tracker("simple");
simple.addListener("change", (name, completed, tracker) => {
    console.log(`name: ${name}, completed: ${completed}`);
});
simple.addWork(10);
simple.completeWork(1);
console.log(simple.completed() < 1);

const group = new TrackerGroup("group");
group.addUnit(simple);

const subgroup = group.newGroup("subgroup");
console.log(group.completed());

const stream = new TrackerStream("stream", 100, { encoding: "utf8" });
subgroup.addUnit(stream);

stream.addListener("change", (name, completed, tracker) => {
    console.log(`name: ${name}, completed: ${completed}`);
});

simple.finish();
console.log(group.debug());
github DefinitelyTyped / DefinitelyTyped / types / are-we-there-yet / are-we-there-yet-tests.ts View on Github external
import { Tracker, TrackerStream, TrackerGroup } from "are-we-there-yet";

const simple = new Tracker("simple");
simple.addListener("change", (name, completed, tracker) => {
    console.log(`name: ${name}, completed: ${completed}`);
});
simple.addWork(10);
simple.completeWork(1);
console.log(simple.completed() < 1);

const group = new TrackerGroup("group");
group.addUnit(simple);

const subgroup = group.newGroup("subgroup");
console.log(group.completed());

const stream = new TrackerStream("stream", 100, { encoding: "utf8" });
subgroup.addUnit(stream);
github DefinitelyTyped / DefinitelyTyped / types / are-we-there-yet / are-we-there-yet-tests.ts View on Github external
const simple = new Tracker("simple");
simple.addListener("change", (name, completed, tracker) => {
    console.log(`name: ${name}, completed: ${completed}`);
});
simple.addWork(10);
simple.completeWork(1);
console.log(simple.completed() < 1);

const group = new TrackerGroup("group");
group.addUnit(simple);

const subgroup = group.newGroup("subgroup");
console.log(group.completed());

const stream = new TrackerStream("stream", 100, { encoding: "utf8" });
subgroup.addUnit(stream);

stream.addListener("change", (name, completed, tracker) => {
    console.log(`name: ${name}, completed: ${completed}`);
});

simple.finish();
console.log(group.debug());
github npm / npmlog / test / progress.js View on Github external
function resetTracker () {
  log.disableProgress()
  log.tracker = new Progress.TrackerGroup()
  log.enableProgress()
  actions = []
}

are-we-there-yet

Keep track of the overall completion of many disparate processes

ISC
Latest version published 3 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages