How to use the grunt.verbose 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 jubalm / grunt-fontello / tasks / lib / fontello.js View on Github external
case 'less':
                        cssPath = path.join(options.styles, basename.replace(ext, '.less'));
                        break;
                      case 'scss':
                        cssPath = path.join(options.styles, '_' + basename.replace(ext, '.scss'));
                        break;
                      default:
                        grunt.fail.warn('Unknown preprocessor "' + options.output + '"');
                        return;
                    }

                    return entry.pipe(fs.createWriteStream(cssPath));
                  }
                // Drain everything else
                default:
                  grunt.verbose.writeln('Ignored ', entry.path);
                  entry.autodrain();
              }
            }
          })
          .on('close', function(){
github jonschlinkert / grunt-readme / tasks / lib / utils.js View on Github external
data.map(function(val) {
      grunt.verbose.ok('Type:'.yellow, grunt.util.kindOf(val));
      // Skip empty data files to avoid compiler errors
      if (_.isString(val)) {
        grunt.file.expand(val).forEach(function(filepath) {
          var checkForContent = grunt.file.read(filepath);
          if (checkForContent.length === 0 || checkForContent === '') {
            grunt.verbose.warn('Skipping empty path:'.yellow, val);
          } else {
            var parsedData = exports.readData(filepath);
            metadata = grunt.config.process(_.extend({}, metadata, parsedData));
            grunt.verbose.ok('metadata:'.yellow, metadata);
          }
        });
      }
      if (_.isObject(val)) {
        metadata = grunt.config.process(_.extend({}, metadata, val));
        grunt.verbose.ok('metadata:'.yellow, metadata);
github jasmine-contrib / grunt-jasmine-task / tasks / jasmine.js View on Github external
options = grunt.util._.extend({},defaultOptions,options);

  var phantomReporters = [
      grunt.task.getFile('jasmine/reporters/ConsoleReporter.js'),
      grunt.task.getFile('jasmine/reporters/JUnitReporter.js')
    ],
    port = (options.server && options.server.port) || 8888;

  var url = URL.format({
    protocol : 'http',
    hostname : '127.0.0.1',
    port : port + '',
    pathname : path.join(baseDir,tmpRunner)
  });

  grunt.verbose.subhead('Testing jasmine specs via phantom').or.writeln('Testing jasmine specs via phantom');
  jasmine.buildSpecrunner(baseDir, options, phantomReporters);
  var server = startServer(baseDir, port);

  runPhantom(url,options,phantomReporters.length,function(err,status){
    server.close();
    if (typeof cb === 'function') cb(err,status);
  });
};
github facebook / react / grunt / tasks / sauce-tunnel.js View on Github external
grunt.fatal('Requires the environment variable SAUCE_USERNAME to be set');
  }

  var IDENTIFIER = process.env.TRAVIS_JOB_NUMBER || 'my awesome tunnel';

  var taskCompletedSuccessfully = task.async();

  var stunnel = new SauceTunnel(SAUCE_USERNAME, SAUCE_ACCESS_KEY, IDENTIFIER, /*tunneled*/true, /*tunnelTimeout*/5);
  process.on('exit', stunnel.stop.bind(stunnel, function() {}));

  stunnel.on('log:error', grunt.log.error.bind(grunt.log));
  stunnel.on('log:writeln', grunt.log.writeln.bind(grunt.log));

  stunnel.on('verbose:ok', grunt.verbose.ok.bind(grunt.verbose));
  stunnel.on('verbose:error', grunt.verbose.error.bind(grunt.verbose));
  stunnel.on('verbose:debug', grunt.verbose.debug.bind(grunt.verbose));
  stunnel.on('verbose:writeln', grunt.verbose.writeln.bind(grunt.verbose));

  stunnel.openTunnel(function(isOpen) {
    if (shouldStayAliveForever && isOpen) {
      grunt.verbose.writeln('Keeping the sauce-tunnel open forever because you used the keepalive flag `' + task.nameArgs + '`');
      return;
    }
    grunt.verbose.writeln('To keep the sauce-tunnel open forever, use the grunt task `' + task.nameArgs + ':keepalive`');
    taskCompletedSuccessfully(isOpen);
  });
};
github facebook / react / grunt / tasks / webdriver-all.js View on Github external
.fail(function(error) {
      grunt.log.error(error);
      return browser
        .eval('document.documentElement.innerText || document.documentElement.textContent')
        .then(grunt.verbose.writeln.bind(grunt.verbose))
        .then(function() {
          throw error;
        });
    })
    .finally(function() {
github facebook / react / grunt / tasks / webdriver-phantomjs.js View on Github external
child.on('exit', function(code) {
    grunt.verbose.writeln('phantomjs END');
    if (code) {
      grunt.fatal('phantomjs FAIL');
    }
  });
github dylang / grunt-notify / lib / util / debug.js View on Github external
Object.keys(obj).forEach(function(key){
    grunt.verbose.ok('[' + name + '] ' + key + ': ' + obj[key]);
  });
}
github rrharvey / grunt-file-blocks / lib / block.js View on Github external
toRemove.forEach(function (file) {
        grunt.verbose.writeln('Removing line for file "' + file + '".');
    });
github viverae / marionette.formview / node_modules / grunt-jasmine-runner / tasks / jasmine.js View on Github external
phantomjs.on('jasmine.begin',function(){
    grunt.verbose.writeln('Starting...');
  });
github busterjs / grunt-buster / tasks / buster / cmd.js View on Github external
phantomProcess.stderr.on('data', function (data) {
        grunt.verbose.writeln(data);
      });