How to use the gulplog.error function in gulplog

To help you get started, we’ve selected a few gulplog 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 gulpjs / gulp-cli / index.js View on Github external
logVerify(blacklisted);
    });
  }

  if (!env.modulePath) {
    /* istanbul ignore next */
    var missingNodeModules =
      fs.existsSync(path.join(env.cwd, 'package.json'))
      && !fs.existsSync(path.join(env.cwd, 'node_modules'));

    /* istanbul ignore next */
    var missingGulpMessage =
      missingNodeModules
        ? 'Local modules not found in'
        : 'Local gulp not found in';
    log.error(
      ansi.red(missingGulpMessage),
      ansi.magenta(tildify(env.cwd))
    );
    /* istanbul ignore next */
    var installCommand =
      missingNodeModules
        ? 'npm install'
        : 'npm install gulp';
    log.error(ansi.red('Try running: ' + installCommand));
    exit(1);
  }

  if (!env.configPath) {
    log.error(ansi.red('No gulpfile found'));
    exit(1);
  }
github gulpjs / gulp-cli / lib / versioned / ^4.0.0 / log / events.js View on Github external
gulpInst.on('error', function(evt) {
    var msg = formatError(evt);
    var time = prettyTime(evt.duration);
    var level = evt.branch ? 'debug' : 'error';
    log[level](
      '\'' + ansi.cyan(evt.name) + '\'',
      ansi.red('errored after'),
      ansi.magenta(time)
    );

    // If we haven't logged this before, log it and add to list
    if (loggedErrors.indexOf(evt.error) === -1) {
      log.error(msg);
      loggedErrors.push(evt.error);
    }
  });
}
github gulpjs / gulp-cli / lib / versioned / ^4.0.0-alpha.2 / index.js View on Github external
var output = JSON.stringify(copyTree(tree, opts));

      if (typeof opts.tasksJson === 'boolean' && opts.tasksJson) {
        return console.log(output);
      }
      return fs.writeFileSync(opts.tasksJson, output, 'utf-8');
    }
    try {
      log.info('Using gulpfile', color.highlight(tildify(env.configPath)));
      gulpInst.parallel(toRun)(function(err) {
        if (err) {
          exit(1);
        }
      });
    } catch (err) {
      log.error(color.error(err.message));
      log.error('To list available tasks, try running: gulp --tasks');
      exit(1);
    }
  });
}
github ginetta / skeleton / gulp / tasks / release.js View on Github external
inquirer.prompt([bumpTypeQuestion], function( answers ) {
    if (answers !== null && answers[bumpTypeQuestion.name] !== null) {
      bumpVersion(answers[bumpTypeQuestion.name], done);
    } else {
      logger.error('ERR: There was an error with the provided bump type');
      process.exit(1);
    }
  });
}
github gulpjs / gulp-cli / lib / versioned / ^3.7.0 / log / events.js View on Github external
gulpInst.on('task_not_found', function(err) {
    log.error(
      color.error('Task \'' + err.task + '\' is not in your gulpfile')
    );
    log.error('Please check the documentation for proper gulpfile formatting');
    exit(1);
  });
}
github minecraft-addon-tools / minecraft-addon-toolchain / packages / minecraft-addon-toolchain / v1 / index.js View on Github external
}
        let packs = [...this.packs];
        if (type) {
            packs = packs.filter(p => !type || p.types.some(t => t === type));
        }

        const tasks = packs.map(p => {
            const task = (taskDone) => {
                return action(p, taskDone);
            };
            task.displayName = `${description}: ${p.relativePath}`;
            return task;
        });

        if (tasks.length === 0) {
            log.error("No packs found");
            done();
            return;
        }

        const completeDynamicTasks = (seriesDone) => {
            seriesDone();
            done();
        };
        completeDynamicTasks.displayName = `${description}: completeDynamicTasks`;

        //FIXME: find a way to invoke done() in a way that's safe for parallel that doesn't involve creating a bogus task in the task list.
        //If I were using series, I could simply invoke it when the last pack is being processed.
        return series(
            parallel(...tasks),
            completeDynamicTasks
        )();
github expo / xde / gulp / postinstall-tasks.js View on Github external
async postInstall() {
    let appRoot = path.join(
      XDE_ROOT,
      'node_modules/electron-prebuilt/dist/Electron.app'
    );
    let xdeIconsPath = path.join(XDE_ROOT, 'dev/xde.icns');
    let appIconsPath = path.join(appRoot, 'Contents/Resources/electron.icns');
    try {
      await fs.promise.copy(xdeIconsPath, appIconsPath);
      logger.info(crayon.green('Copied icons into electron-prebuilt'));
    } catch (error) {
      logger.error('Failed to copy icons into electron-prebuilt');
      logger.error(error.stack);
    }
  },
};
github gms1 / node-sqlite3-orm / build / gulp / WatchTaskBuilder.js View on Github external
var waitForChanges = (waitDone) => {
      if (!this.watchGlobs.size) {
        gulpLog.error('nothing to watch');
        waitDone();
        return;
      }
      gulpWatch(Array.from(this.watchGlobs), gulpBatch((events, batchDone) => {
                  gulpLog.info('WATCHING: got change event');
                  runBuildTargets(batchDone);
                }));
    };

gulplog

Logger for gulp and gulp plugins

MIT
Latest version published 9 months ago

Package Health Score

74 / 100
Full package analysis