How to use the nomnom.options function in nomnom

To help you get started, we’ve selected a few nomnom 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 harthur / kittydar / training / neuralnet / test-network.js View on Github external
var fs = require("fs"),
    path = require("path"),
    brain = require("brain"),
    nomnom = require("nomnom"),
    params = require("./params"),
    utils = require("../../utils"),
    collect = require("../collect");

var opts = nomnom.options({
  pos: {
    abbr: 'p',
    list: true,
    required: true,
    help: "Directory of test positive images"
  },
  neg: {
    abbr: 'n',
    list: true,
    required: true,
    help: "Directory of test negative images"
  },
  json: {
    default: __dirname + "/network.json",
    help: "Neural network JSON file"
  },
github harthur / kittydar / training / svm / test-svm.js View on Github external
var fs = require("fs"),
    path = require("path"),
    nomnom = require("nomnom"),
    svm = require("svm"),
    params = require("./params"),
    utils = require("../../utils"),
    collect = require("../collect");

var opts = nomnom.options({
  pos: {
    abbr: 'p',
    list: true,
    required: true,
    help: "Directory of positive test images"
  },
  neg: {
    abbr: 'n',
    list: true,
    required: true,
    help: "Directory of negative test images"
  },
  jsonFile: {
    default: __dirname + "/svm.json",
    help: "SVM JSON file"
  },
github raphamorim / node-replace / bin / search.js View on Github external
#!/usr/bin/env node

var nomnom = require("nomnom"),
  replace = require("../replace"),
  sharedOptions = require("./shared-options");

var options = nomnom.options(sharedOptions)
  .script("search")
  .parse();

replace(options);
github trailbehind / tile-squirrel / bin / add-tile-list.js View on Github external
#!/usr/bin/env node

"use strict";
var debug = require("debug")("tile-squirrel-add-tile-list"),
  QueueWriter = require("../lib/queueWriter");

var nomnom = require("nomnom")
  .options({
    sources: {
      position: 0,
      help: "source names to queue",
      list: true
    },
    file: {
      abbr: "f",
      metavar: "FILE",
      help: "Read list from file. By default list is read from STDIN"
    },
    version: {
      abbr: "v",
      flag: true,
      help: "Show version info",
      callback: function() {
github trailbehind / tile-squirrel / bin / add-tile.js View on Github external
#!/usr/bin/env node

"use strict";

var debug =  require("debug")("tile-squirrel-add-tile"),
  QueueWriter =  require("../lib/queueWriter"),
  path = require("path");


var nomnom = require("nomnom")
  .options({
    source: {
      position: 0,
      help: "Source to queue",
    },
    tile: {
      position: 1,
      help: "Tile to queue",
    },
    config: {
      abbr: "c",
      metavar: "CONFIG",
      help: "Provide a configuration file. Configuration file is not needed," + 
      " but if it is provided sources will be verified to exist in config."
    },
    version: {
github trailbehind / tile-squirrel / bin / copy-info.js View on Github external
#!/usr/bin/env node

"use strict";
var debug = (debug = require("debug")("tile-squirrel-add-bbox")),
  path = require("path"),
  Q = require("q");

var nomnom = require("nomnom")
  .options({
    sources: {
      position: 0,
      help: "source names to queue",
      list: true
    },
    config: {
      abbr: "c",
      metavar: "CONFIG",
      help: "Configuration file."
    },
    version: {
      abbr: "v",
      flag: true,
      help: "Show version info",
      callback: function() {
github trailbehind / tile-squirrel / bin / squirrel.js View on Github external
#!/usr/bin/env node

"use strict";

process.env.UV_THREADPOOL_SIZE = process.env.UV_THREADPOOL_SIZE || 4;

var nomnom = require("nomnom")
  .options({
    config: {
      abbr: "c",
      metavar: "CONFIG",
      required: true,
      help: "Provide a configuration file"
    },
    require: {
      abbr: "r",
      metavar: "MODULE",
      help: "Require a specific tilelive module",
      list: true
    },
    defer: {
      abbr: "d",
      flag: true,
github camptocamp / ngeo / buildtools / serve.js View on Github external
var path = require('path');
var url = require('url');

var closure = require('ol/node_modules/closure-util');
var nomnom = require('nomnom');

var log = closure.log;

var options = nomnom.options({
  port: {
    abbr: 'p',
    'default': 3000,
    help: 'Port for incoming connections',
    metavar: 'PORT'
  },
  loglevel: {
    abbr: 'l',
    choices: ['silly', 'verbose', 'info', 'warn', 'error'],
    'default': 'info',
    help: 'Log level',
    metavar: 'LEVEL'
  }
}).parse();
github tombatossals / angular-openlayers-directive / bower_components / openlayers3 / tasks / build.js View on Github external
async.waterfall([
    assertValidConfig.bind(null, config),
    generateExports.bind(null, config),
    getDependencies.bind(null, config),
    build.bind(null, config),
    addHeader
  ], callback);
}


/**
 * If running this module directly, read the config file and call the main
 * function.
 */
if (require.main === module) {
  var options = nomnom.options({
    config: {
      position: 0,
      required: true,
      help: 'Path to JSON config file'
    },
    output: {
      position: 1,
      required: true,
      help: 'Output file path'
    },
    loglevel: {
      abbr: 'l',
      choices: ['silly', 'verbose', 'info', 'warn', 'error'],
      default: 'info',
      help: 'Log level',
      metavar: 'LEVEL'
github mapgears / ol3-google-maps / build / serve.js View on Github external
log.error('ol3-google-maps', e.message);
  });
  manager.on('ready', function() {
    server = new closure.Server({
      manager: manager,
      loader: '/@loader'
    });
    callback(null, server);
  });
};

/**
 * If running this module directly start the server.
 */
if (require.main === module) {
  var options = nomnom.options({
    port: {
      abbr: 'p',
      'default': 4000,
      help: 'Port for incoming connections',
      metavar: 'PORT'
    },
    loglevel: {
      abbr: 'l',
      choices: ['silly', 'verbose', 'info', 'warn', 'error'],
      'default': 'info',
      help: 'Log level',
      metavar: 'LEVEL'
    }
  }).parse();

  /** @type {string} */

nomnom

Option parser with generated usage and commands

MIT
Latest version published 9 years ago

Package Health Score

50 / 100
Full package analysis