How to use console-ui - 5 common examples

To help you get started, we’ve selected a few console-ui 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 cardstack / cardstack / packages / cli / bin / cardstack.ts View on Github external
#!/usr/bin/env node

// This rule is confused by us being TypeScript (the package.json file points at
// our JS output, so we are not technically a "binary" in package.json).
/* eslint-disable node/shebang */

import yargs from "yargs";
import UI from "console-ui";
import { homedir } from "os";
import { join } from "path";
const ui = new UI();

yargs
  .scriptName("cardstack")
  .command(
    "start",
    "Start the Cardstack environment",
    args => {
      return args.option("dir", {
        alias: "d",
        describe: "path to your local running cardstack",
        type: "string",
        default: join(homedir(), ".cardstack"),
      });
    },
    async function(argv) {
      let run = await import("../run");
github embroider-build / embroider / test-packages / support / build.ts View on Github external
constructor(options?: any) {
    options = options || {};

    this.ui = options.ui || new MockUI();
    this.root = join(__dirname, '..', '..');
    this.npmPackage = options.npmPackage || 'ember-cli';
    this.instrumentation = options.instrumentation || new Instrumentation({});
    this.packageInfoCache = new PackageInfoCache(this.ui);
  }
}
github jasonmit / nest-cli / lib / ui / index.js View on Github external
'use strict';

const colors = require('colors');
const Table = require('cli-table');
const ConsoleUI = require('console-ui');

function UI() {
  ConsoleUI.apply(this, arguments);
}

UI.prototype = Object.create(ConsoleUI.prototype);

Object.assign(UI.prototype, {
  constructor: UI,

  startProgress(message) {
    return ConsoleUI.prototype.startProgress.call(this, message || '');
  },

  color(color, string) {
    return colors[color](string);
  },

  createTable(options) {
    return new Table(options);
  }
});
github jasonmit / nest-cli / lib / ui / index.js View on Github external
startProgress(message) {
    return ConsoleUI.prototype.startProgress.call(this, message || '');
  },
github jasonmit / nest-cli / lib / ui / index.js View on Github external
function UI() {
  ConsoleUI.apply(this, arguments);
}

console-ui

common interface for abstracting a console ui

ISC
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Similar packages