How to use the colors.white function in colors

To help you get started, we’ve selected a few colors 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 semiromid / compress-images / test / node_modules / compress-images / index.js View on Github external
function log_create_wasdir(output){
        console.log(colors.bgYellow(colors.yellow(' New directory was created: ')+colors.yellow(output)+'  '));
        console.log(colors.bgYellow(colors.white(' New directory was created: ')+colors.magenta(output)+'  '));
        console.log(colors.bgYellow(colors.yellow(' New directory was created: ')+colors.yellow(output)+'  '));          
    }
github theuves / dicio / src / printInformations.js View on Github external
const printNormal = (str) => console.log(colors.white(str))
const printTitle = (str) => console.log(colors.bold.underline.green(str))
github apidoc / apidoc / lib / utils / console_logger.js View on Github external
Logger.prototype.error = function(message, extra) {
    if ( ! this.isSilent) {
        console.error(colors.red('error:   ') + message);
        if (extra)
            console.error(colors.white(this._getExtra(extra)));
    }
};
github steveblue / angular2-rollup / src / log.js View on Github external
if (typeof err.column === 'number') {
              err.column = err.column.toString();
            }


            let lineNumbers = (err.line.length > 0) ? colors.white(err.line + ':' + err.column).dim : '';

            if (err.file && err.file.length > 0) {
                msg += err.message.replace(/'(.*?)'/g, colors.red("'") + colors.red("$1") + colors.red("'"))
                    .replace(/(error)( )((?:TS[a-z0-9]*))(:)/g, colors.white("$1$2$3").dim);
                link += err.file.includes(config.projectRoot) ?
                    colors.dim(' vscode://file/' + err.file + ':' + lineNumbers) + '\n' :
                    colors.dim(' vscode://file/' + config.projectRoot + '/' + err.file + ':' + lineNumbers) + '\n';
                process.stdout.write(colors.red(' ' + err.service.toUpperCase() + ' ERROR') + ' ' +
                ((err.file.length > 0) ? colors.white(colors.dim(err.file) + ' ' + lineNumbers) : '') + '\n\n' +
                colors.white(msg) + '\n\n'+
                ((err.file.length > 0) ? link : '') + '\n');

            } else {
                msg = err.message;
                process.stdout.write(colors.red(' ' + err.service.toUpperCase() + ' ERROR') + ' ' +
                colors.white(msg) + '\n\n');

            }



            this.line();

        }
github steveblue / angular2-rollup / src / log.js View on Github external
message(msg) {
        //this.spinner.stop();
        msg = msg ? '' + colors.white(msg).dim : '';
        logger(msg);
        process.stderr.write('\x1B[?25l');
        if (cli.program.verbose) this.break();
    }
github shamadee / wasm-init / index.js View on Github external
`, (err, stdout) => {
    if (err) process.stderr.write(colors.white(err));
    process.stdout.write(stdout);
    insertEventListener();
  });
}
github steveblue / angular2-rollup / src / log.js View on Github external
line() {
        process.stdout.write('\n');
        const col = process.stdout.columns;
        let line = ' ';
        for (let i = 0; i < col - 2; i++) {
            line += '\u2500';
        }
        line += '\n';
        process.stdout.write(colors.white(colors.dim(line)));
    }
github alibaba / funcraft / lib / import / utils.js View on Github external
function createProgressBar(format, options) {
  const opts = Object.assign({
    complete: green('█'),
    incomplete: white('█'),
    width: 20,
    clear: true
  }, options);
  const bar = new ProgressBar(format, opts);
  const old = bar.tick;
  const loadingChars = ['⣴', '⣆', '⢻', '⢪', '⢫'];
  bar.tick = (len, tokens) => {
    const newTokens = Object.assign({
      loading: loadingChars[parseInt(Math.random() * 5)]
    }, tokens);
    old.call(bar, len, newTokens);
  };
  return bar;
}
github shamadee / wasm-init / index.js View on Github external
fs.writeFile('./wasm/lib.temp.js', data, (err2) => {
      if (err2) process.stderr.write(colors.white(err2));
      fs.renameSync('./wasm/lib.temp.js', './wasm/lib.js');
    });
  });
github steveblue / angular2-rollup / src / log.js View on Github external
}

            if (!err.column) {
                err.column = '';
            }

            if (typeof err.line === 'number') {
              err.line = err.line.toString();
            }

            if (typeof err.column === 'number') {
              err.column = err.column.toString();
            }


            let lineNumbers = (err.line.length > 0) ? colors.white(err.line + ':' + err.column).dim : '';

            if (err.file && err.file.length > 0) {
                msg += err.message.replace(/'(.*?)'/g, colors.red("'") + colors.red("$1") + colors.red("'"))
                    .replace(/(error)( )((?:TS[a-z0-9]*))(:)/g, colors.white("$1$2$3").dim);
                link += err.file.includes(config.projectRoot) ?
                    colors.dim(' vscode://file/' + err.file + ':' + lineNumbers) + '\n' :
                    colors.dim(' vscode://file/' + config.projectRoot + '/' + err.file + ':' + lineNumbers) + '\n';
                process.stdout.write(colors.red(' ' + err.service.toUpperCase() + ' ERROR') + ' ' +
                ((err.file.length > 0) ? colors.white(colors.dim(err.file) + ' ' + lineNumbers) : '') + '\n\n' +
                colors.white(msg) + '\n\n'+
                ((err.file.length > 0) ? link : '') + '\n');

            } else {
                msg = err.message;
                process.stdout.write(colors.red(' ' + err.service.toUpperCase() + ' ERROR') + ' ' +
                colors.white(msg) + '\n\n');