How to use the buntstift.default.line 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 / watchFilesAndExecute.js View on Github external
const watchFilesAndExecute = async function ({ message, files, execute, executeOnStart = false }) {
  if (!message) {
    throw new Error('Message is missing.');
  }
  if (!files) {
    throw new Error('Files are missing.');
  }
  if (!execute) {
    throw new Error('Execute is missing.');
  }

  buntstift.line();
  buntstift.info(message, { prefix: '▸' });

  const handleChange = function () {
    if (isCurrentlyExecuting) {
      return;
    }
    isCurrentlyExecuting = true;

    (async () => {
      try {
        await execute();
      } catch (ex) {
        // In watch mode, we ignore any errors (since we do not have an
        // exit code anyway).

        buntstift.verbose(ex.message);