How to use the yargs.argv.verbose function in yargs

To help you get started, we’ve selected a few yargs 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 nativescript-vue / nativescript-vue-ui-tests / generate-screenshots.js View on Github external
(async function () {
    makeDir('screenshots');
    makeDir(`screenshots/${argv.runType}`);

    const appiumCaps = require('./appium.capabilities.json')[argv.runType];
    let args = new NsCapabilities({
      port: 4723,
      isSauceLab: argv.sauceLab || false,
      runType: argv.runType,
      appPath: argv.appPath, //'nativescriptvueuitests-debug.apk',
      appiumCaps: appiumCaps,
      verbose: argv.verbose || false,
      validateArgs: () => {},
    })
    // Hack to fix a `Cannot read property 'token' of undefined` error
    // See https://github.com/NativeScript/nativescript-dev-appium/issues/142
    if (args.isAndroid) {
        args.device = DeviceManager.getDefaultDevice(args, appiumCaps.avd);
    } else {
        args.device = DeviceManager.getDefaultDevice(args);
    }

    AppiumDriver.createAppiumDriver(args)
        .then(driver => run(driver))
        .then(() => console.log('Buh-Bye...'))
        .catch((err) => console.log(err));
})();
github garage11 / ca11 / gulp / settings.js View on Github external
module.exports = function config(projectDir, projectName, baseDir, {overrides = {}} = {}) {
    // Define all static or simple condition settings here.
    let settings = {
        BASE_DIR: baseDir,
        BUILD_OPTIMIZED: argv.optimized ? true : (process.env.NODE_ENV === 'production'),
        BUILD_TARGET: argv.target ? argv.target : 'pwa',
        BUILD_TARGETS: ['pwa', 'node'],
        BUILD_VERBOSE: argv.verbose ? true : false,
        DEBUG_MODE: process.env.DEBUG === '1' ? true : false,
        // Default loglevel is info.
        LOG_LEVEL: (argv.L && argv.L.length <= 4) ? argv.L.length : 3,
        LOG_LEVELS: ['error', 'warning', 'info', 'debug'],
        NODE_ENVS: ['development', 'production'],
        // Safest default deploy target is `alpha`.
        PROJECT_DIR: projectDir,
        // Generate screenshots during browser tests?
        SIZE_OPTIONS: {showFiles: true, showTotal: true},

    }

    // Mix config file in settings and apply overrides.
    rc('ca11', settings)

    Object.assign(settings, overrides)
github infor-design / enterprise / scripts / minify-css.js View on Github external
return writeFile(targetFilePath, minified).then((err) => {
    if (err) {
      logger('error', `Error minifying "${srcFilePath}": ${err}`);
      return;
    }
    // Only log if not in --verbose mode (file logger has more detailed results)
    if (!commandLineArgs.verbose) {
      logger('success', `Successfully minified "${targetFilePath}"`);
    }
  });
}
github nfl / react-wildcat / packages / react-wildcat-test-runners / src / utils / startLocalServer.js View on Github external
export default async function startLocalServer() {
    console.info(chalk.grey("No server found. Starting one now."));

    return yawn(`${testEnv} wildcat`, {
        resolveWhenLineIncludes: SERVER_AVAILABLE_STRING,
        printStdout: argv.verbose
    });
}
github rbren / scrape-to-swagger / index.js View on Github external
var log = function() {
  if (argv.verbose) console.log.apply(console, arguments);
}
github dvaJi / ReaderFront / gulpfile.js View on Github external
function serve(isDev, specRunner) {
  var debugMode = '--debug';
  var nodeOptions = getNodeOptions(isDev);

  nodeOptions.nodeArgs = [debugMode + '=5858'];

  if (args.verbose) {
    console.log(nodeOptions);
  }

  return $.nodemon(nodeOptions)
    .on('restart', ['vet'], function(ev) {
      log('*** nodemon restarted');
      log('files changed:\n' + ev);
      setTimeout(function() {
        browserSync.notify('reloading now ...');
        browserSync.reload({ stream: false });
      }, config.browserReloadDelay);
    })
    .on('start', function() {
      log('*** nodemon started');
      startBrowserSync(isDev, specRunner);
    })
github PabloHidalgo / angularjs-1.5-components-showcase / gulpfile.js View on Github external
gulp.task('templatecache', ['clean-code'], function() {
    log('Creating an AngularJS $templateCache');

    return gulp
        .src(config.htmltemplates)
        .pipe($.if(args.verbose, $.bytediff.start()))
        .pipe($.minifyHtml({empty: true}))
        .pipe($.if(args.verbose, $.bytediff.stop(bytediffFormatter)))
        .pipe($.angularTemplatecache(
            config.templateCache.file,
            config.templateCache.options
        ))
        .pipe(gulp.dest(config.temp));
});
github johnpapa / generator-hottowel / app / templates / _gulpfile.js View on Github external
gulp.task('vet', function() {
  log('Analyzing source with JSHint and JSCS');

  return gulp
    .src(config.alljs)
    .pipe($.if(args.verbose, $.print()))
    .pipe($.jshint())
    .pipe($.jshint.reporter('jshint-stylish', { verbose: true }))
    .pipe($.jshint.reporter('fail'))
    .pipe($.jscs());
});
github qaprosoft / zafira / sources / zafira-web / angular / gulpfile.js View on Github external
gulp.task('vet', function() {
    log('Analyzing source with JSHint and JSCS');

    return gulp
        .src(config.alljs)
        .pipe($.if(args.verbose, $.print()))
        .pipe($.jscs())
        .pipe($.jshint())
        .pipe($.jshint.reporter('jshint-stylish', {verbose: true}))
        .pipe($.jshint.reporter('fail'));
});
github ManageIQ / manageiq-ui-service / gulpfile.js View on Github external
function argOptions() {
  return {
    rev: !!(args.rev || args.production),
    minify: !!(args.minify || args.production),
    production: !!args.production,
    verbose: !!(args.verbose || args.v),
    startServer: !!args.startServer,
    debug: !!(args.debug || args.debugBrk),
    debugBrk: !!args.debugBrk,
    nosync: !!args.nosync,
    type: args.type,
    version: args.version
  };
}