How to use the colors-cli/safe.green function in colors-cli

To help you get started, we’ve selected a few colors-cli 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 jaywcjlove / mocker-api / bin / mocker.js View on Github external
app.listen(DEFAULT_PORT, () => {
    const localIpUrl = prepareUrls({
      protocol: 'http',
      host: HOST,
      port: DEFAULT_PORT,
    });
    console.log(`> Server Listening at Local: ${color.green(localIpUrl.localUrl)}`);
    console.log(`>           On Your Network: ${color.green(localIpUrl.lanUrl)}\n`);
  });
  /**
github jaywcjlove / mocker-api / bin / mocker.js View on Github external
app.all('/*', (req, res, next) => {
    console.log(`${color.green(req.method)} - ${req.url}`);
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Content-Type,Content-Length,Authorization,Accept,X-Requested-With');
    res.header('Access-Control-Allow-Methods', 'PUT,POST,GET,DELETE,OPTIONS');
    next();
  });
github jaywcjlove / mocker-api / bin / mocker.js View on Github external
app.listen(DEFAULT_PORT, () => {
    const localIpUrl = prepareUrls({
      protocol: 'http',
      host: HOST,
      port: DEFAULT_PORT,
    });
    console.log(`> Server Listening at Local: ${color.green(localIpUrl.localUrl)}`);
    console.log(`>           On Your Network: ${color.green(localIpUrl.lanUrl)}\n`);
  });
  /**
github kktjs / kkt / .bin / kkt.js View on Github external
.on('--help', () => {
    logs();
    logs('  Examples:');
    logs();
    logs(`    $ ${colors.green('kkt test --env=jsdom')}`);
    logs(`    $ ${colors.green('kkt test --env=jsdom --coverage')}`);
    logs();
  })
  .action((env, coverage, cmd) => {
github kktjs / kkt / .bin / kkt.js View on Github external
.on('--help', () => {
    logs();
    logs('  Examples:');
    logs();
    logs(`    $ ${colors.green('kkt test --env=jsdom')}`);
    logs(`    $ ${colors.green('kkt test --env=jsdom --coverage')}`);
    logs();
  })
  .action((env, coverage, cmd) => {
github kktjs / kkt / .bin / kkt.js View on Github external
.on('--help', () => {
    logs()
    logs('  Examples:')
    logs('    https://webpack.docschina.org/configuration/watch/#watchoptions')
    logs(`    May be used for ${colors.green('Electron')} or ${colors.green('Chrome-Plugin')} project development.`)
    logs()
    logs('    $ kkt watch')
    logs()
  })
  .action((cmd) => {
github kktjs / kkt / .bin / kkt.js View on Github external
program.on('--help', function () {
  logs('\n  Examples:');
  logs();
  logs(`    $ ${colors.green('kkt')} start`);
  logs(`    $ ${colors.green('kkt')} build`);
  logs(`    $ ${colors.green('kkt')} watch`);
  logs(`    $ ${colors.green('kkt')} test --env=jsdom`);
  logs(`    $ ${colors.green('kkt')} test --env=jsdom --coverage`);
  logs();
  logs();
})