How to use the ansicolors.bgYellow function in ansicolors

To help you get started, we’ve selected a few ansicolors 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 elastic / kibana / src / cli / dev / watch.js View on Github external
let _ = require('lodash');
let nodemon = require('nodemon');
let join = require('path').join;
let relative = require('path').relative;
let normalize = require('path').normalize;
let ansicolors = require('ansicolors');

let root = join(__dirname, '..', '..', '..');
let fromRoot = _.restParam(function (segs) {
  return normalize(join.apply(null, [root].concat(segs)));
});
let rel = _.partial(relative, root);

let green = _.flow(ansicolors.black, ansicolors.bgGreen);
let red = _.flow(ansicolors.white, ansicolors.bgRed);
let yellow = _.flow(ansicolors.black, ansicolors.bgYellow);

let crash = red(' Kibana Crashed ');
let restart = yellow(' Kibana Restarted ');
let start = green(' Kibana Started ');
let args = _.without(process.argv.slice(2), '--watch');

console.log(yellow(' Kibana starting '), 'and watching for changes');

nodemon({
  script: fromRoot('src/cli/index.js'),
  args: args,
  watch: [
    fromRoot('src/'),
    fromRoot('config/'),
  ],
  ignore: fromRoot('src/**/public/'),