How to use the log-symbols.success function in log-symbols

To help you get started, we’ve selected a few log-symbols 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 rdev / expressx / src / init / index.js View on Github external
proc.on('exit', async (code) => {
		if (code === 0) {
			if (flow) {
				try {
					await installFlow();
				} catch (e) {
					spinner.fail('There was an error installing dependencies.');
				}
			}

			spinner.stop();
			console.log();
			console.log(ls.success, chalk.green('Woohoo! Everything is good to go!'));
			console.log('To start your app, just run:');
			console.log();
			console.log(chalk.cyan('    npm start'));
			console.log();
			console.log('Happy coding!');

			process.exit(); // eslint-disable-line unicorn/no-process-exit
		} else {
			spinner.fail('There was an error installing dependencies.');
		}
	});
}
github sarfraznawaz2005 / whatspup / chat.js View on Github external
async function startChat(user) {
      // replace selector with selected user
      let user_chat_selector = selector.user_chat;
      user_chat_selector = user_chat_selector.replace('XXX', user);

      await page.waitFor(user_chat_selector);
      await page.click(user_chat_selector);
      await page.click(selector.chat_input);
      let name = getCurrentUserName();

      if (name) {
        console.log(logSymbols.success, chalk.bgGreen('You can chat now :-)'));
        console.log(logSymbols.info, chalk.bgRed('Press Ctrl+C twice to exit any time.\n'));
      } else {
        console.log(logSymbols.warning, 'Could not find specified user "' + user + '"in chat threads\n');
      }
    }
github neo-one-suite / neo-one / packages / neo-one-cli / src / interactive / createCRUD.js View on Github external
const getSymbol = (task: TaskStatus, spinners: Spinners) => {
  if (spinners[task.id] == null) {
    // eslint-disable-next-line
    spinners[task.id] = elegantSpinner();
  }

  const hasSubtasks = task.subtasks != null && task.subtasks.length > 0;
  if (task.pending) {
    return hasSubtasks ? pointer : chalk.yellow(spinners[task.id]());
  }

  if (task.complete) {
    return logSymbols.success;
  }

  if (task.error != null) {
    return hasSubtasks ? pointer : logSymbols.error;
  }

  if (task.skipped != null) {
    return skipped;
  }

  return ' ';
};
github pgilad / leasot / tests / cli-spec.ts View on Github external
testCli(['file.unsupported'], ['--skip-unsupported'], function(exitCode, log) {
            should.exist(exitCode);
            should.exist(log);
            exitCode.should.equal(0);
            log.should.eql(['', '', ' ' + stripAnsi(logSymbols.success) + ' No todos/fixmes found', '']);
            callback();
        });
    });
github quasarframework / quasar-cli / lib / log.js View on Github external
require('colors')

var
  log,
  symbols = require('log-symbols'),
  messageTypes = {
    success: symbols.success,
    error: symbols.error,
    info: symbols.info,
    warning: symbols.warning,
    debug: '[DEBUG]'.gray
  }

function showMessage () {
  var
    array,
    args = [].slice.call(arguments)

  if (args[0].length === 0) {
    return console.log()
  }

  array = [].slice.call(args[0])
github brandonweiss / discharge / lib / cli / init-command.js View on Github external
module.exports = async (configurationPath) => {
  let data = await configure()

  configuration.write(configurationPath, data)

  console.log(`\n${logSymbols.success}`, `Configuration written to \`${configurationPath}\`!`)
  console.log(`${logSymbols.info}`, "Run `discharge deploy` to deploy your website.")
}
github cypress-io / cypress / packages / server / lib / modes / run.js View on Github external
const getSymbol = function (num) {
  if (num) {
    return logSymbols.error
  }

  return logSymbols.success
}
github mischah / itunes-remote / index.js View on Github external
osascript(stringify(lib.next.method), function (err) {
		var result;
		if (err === null) {
			result = callback(logSymbols.success + ' Skipped track.');
		} else {
			result = callback(logSymbols.error + ' ' + chalk.red(err));
		}
		return result;
	});
}
github tuateam / tua-mp / packages / tua-mp-cli / lib / utils / logFns.js View on Github external
const log = out => logByType('log')(logSymbols.success + ' ' + chalk.green(out))
const info = out => logByType('log')(logSymbols.info + ' ' + chalk.blue(out))
github lucalanca / grunt-a11y / tasks / a11y.js View on Github external
reports.audit.forEach(function (el) {
        if (el.result === 'PASS') {
            passes += logSymbols.success + ' ' + el.heading + '\n';
        }

        if (el.result === 'FAIL') {
            failures += logSymbols.error + ' ' + el.heading + '\n';
            failures += el.elements + '\n\n';
        }
    });

log-symbols

Colored symbols for various log levels. Example: `✔︎ Success`

MIT
Latest version published 3 months ago

Package Health Score

85 / 100
Full package analysis