How to use the grunt.fatal function in grunt

To help you get started, we’ve selected a few grunt 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 prabhash1785 / NodeJS / MyPlayGround / Gruntfile.js View on Github external
grunt.registerTask('taskvalidator', 'validate if a task exist', function(taskname) {
   if(!taskname || !taskname.length) {
       grunt.fatal('Cannot run this task without task name');
   }

    grunt.log.writeln(taskname + ' exists: ' + grunt.task.exists(taskname));

});
github buildfirst / buildfirst / ch02 / 10_mysql-tasks / tasks / lib / util.js View on Github external
handle: function(err){
        if(err){
          grunt.log.writeln('failed.');
          grunt.fatal(err);
        }

        grunt.log.writeln('done.');
    }
};
github bevacqua / grunt-ec2 / tasks / lib / lookupEC2.js View on Github external
function parse(stdout){
        var result = JSON.parse(stdout);
        var instances = _.pluck(result.Reservations, 'Instances');
        var flat = _.flatten(instances);
        if (flat.length > 1) {
            grunt.fatal('Found more than one instance tagged ' + chalk.magenta(name));
        }

        done(flat[0]);
    }
};
github facebook / react / grunt / config / webdriver-jasmine.js View on Github external
onComplete: function(passed) {
    if (!passed) {
      grunt.fatal('tests failed');
    }
  },
  onError: function(error) {
github facebook / react / grunt / tasks / coverage-parse.js View on Github external
.pipe(require('coverify/parse')(function(error, results) {
    if (error) {
      grunt.fatal(error);
    }

    Object.keys(results)
      .sort(function(a, b) {
        return results[a].length - results[b].length;
      })
      .reverse()
      .forEach(function(concretePath) {
        if (results[concretePath].length === 0) {
          return;
        }
        var relativePath = concretePath.replace(ROOT, '');
        uncoveredExpressionCount += results[concretePath].length;
        grunt.log.error(results[concretePath].length + ' expressions not covered ' + relativePath);

        results[concretePath].forEach(function(c) {
github bevacqua / grunt-ec2 / tasks / lib / rsync.js View on Github external
sshCredentials(name, function (c) {

        if (!c) {
            grunt.fatal('This instance is refusing SSH connections for now');
        }

        var verbosity = conf('VERBOSITY_RSYNC');
        var user = conf('AWS_RSYNC_USER');
        var include = clud(opts.includes, 'include');
        var includeFrom = cludFrom(opts.includeFrom, 'include');
        var exclude = clud(opts.excludes, 'exclude');
        var excludeFrom = cludFrom(opts.excludeFrom, 'exclude');

        grunt.log.writeln('Deploying %s to %s using rsync over ssh...', chalk.blue(opts.name), chalk.cyan(c.id));

        var args = ['a', 'z'];
        var eo = {};

        if (verbosity) {
            eo.buffer = 20000 * 1024;
github bevacqua / grunt-ec2 / tasks / lib / ssh.js View on Github external
function ready (err, stream) {
        if (err) { grunt.fatal('Connection error.\n\n',  err); }

        grunt.log.ok('Connection established! Use ctrl+c twice to exit ssh session');

        shell = stream;
        shell.on('data', read.bind(null, options.chalk));
        shell.on('error', fatal);
        shell.on('exit', exitCommand);

        resume();
    }
github angular-ui / ui-grid / lib / grunt / utils.js View on Github external
cachedAngularFiles.forEach(function(f) {
      var filePath = path.join('lib', 'test', 'angular', version, f);

      if (! fs.existsSync(filePath)) {
        grunt.fatal("Angular file " + filePath + " doesn't exist");
      }

      retFiles.push(filePath);
    });
github facebook / react / grunt / config / webdriver-jasmine.js View on Github external
onError: function(error) {
    grunt.fatal(error);
  },
});
github bevacqua / grunt-ec2 / tasks / lib / lookup.js View on Github external
function parse(stdout){
        var result = JSON.parse(stdout);
        var instances = _.pluck(result.Reservations, 'Instances');
        var flat = _.flatten(instances);
        if (flat.length > 1) {
            grunt.fatal('Found more than one instance tagged ' + chalk.magenta(name));
        } else if (flat.length === 0) {
            grunt.fatal('There are no instances tagged ' + chalk.magenta(name));
        }

        done(flat[0]);
    }
};