How to use the buntstift.buntstift.info function in buntstift

To help you get started, we’ve selected a few buntstift 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 thenativeweb / roboter / lib / bin / roboter.js View on Github external
exit();
    }

    const suggestions = findSuggestions({ for: ex.command, in: validCommands });

    buntstift.error(`Unknown command '${ex.command}', did you mean '${suggestions[0].suggestion}'?`);
    buntstift.exit(1);
  }

  if (!parsed.command) {
    parsed.command = defaultCommand;

    if (parsed.argv.length > 0) {
      if (parsed.argv.includes('--version') || parsed.argv.includes('-v')) {
        buntstift.info(packageJson.version);
        buntstift.exit(0);
      }

      if (parsed.argv.includes('--help') || parsed.argv.includes('-h')) {
        parsed.command = 'help';
      }
    }
  }

  const command = commands[parsed.command];
  const validOptionDefinitions = [ ...globalOptionDefinitions, ...await command.getOptionDefinitions() ];

  const args = commandLineArgs(validOptionDefinitions, { argv: parsed.argv, partial: true });

  /* eslint-disable no-underscore-dangle */
  if (args._unknown && args._unknown.length > 0) {
github thenativeweb / roboter / lib / cli / ui / printTaskHeader.js View on Github external
const printTaskHeader = function (name) {
  if (!name) {
    throw new Error('Name is missing.');
  }

  buntstift.line();
  buntstift.info(`Running ${name}...`, { prefix: '▸' });
};
github thenativeweb / roboter / lib / cli / ui / info.js View on Github external
const info = function (message) {
  if (!message) {
    throw new Error('Info is missing.');
  }

  buntstift.info(message);
};
github thenativeweb / roboter / lib / cli / ui / printUsage.js View on Github external
const printUsage = function (usage) {
  buntstift.info(getUsage(usage));
};