Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
explorer: 'elementExplorer'
},
strings: { 'capabilities.tunnel-identifier': '' }
};
optimist.usage('Usage: protractor [configFile] [options]\n' +
'configFile defaults to protractor.conf.js\n' +
'The [options] object will override values from the config file.\n' +
'See the reference config for a full list of options.');
for (let key of Object.keys(optimistOptions.describes)) {
optimist.describe(key, optimistOptions.describes[key]);
}
for (let key of Object.keys(optimistOptions.aliases)) {
optimist.alias(key, optimistOptions.aliases[key]);
}
for (let key of Object.keys(optimistOptions.strings)) {
optimist.string(key);
}
optimist.check(function (arg) {
if (arg._.length > 1) {
throw new Error('Error: more than one config file specified');
}
});
let argv = optimist.parse(args);
if (argv.help) {
optimist.showHelp();
process.exit(0);
}
if (argv.version) {
console.log('Version ' + require(path.resolve(__dirname, '../package.json')).version);
process.exit(0);
}
// Check to see if additional flags were used.
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
// npmbox by Glen R. Goodwin (@areinet)
// https://github.com/arei/npmbox.git
// Creates an archive "box" of one or more npm packages and their dependencies.
"use strict";
var boxxer = require("./npmboxxer.js");
var argv = require("optimist")
.string([
"proxy",
"https-proxy"
])
.boolean(["v","verbose","s","silent"])
.options("t", {
alias: "target",
default: null
})
.argv;
var args = argv._;
if (args.length<1 || argv.help) {
console.log("npmbox - Create an archive for offline installation of the given package.");
console.log("");
console.log("Usage: ");
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
#!/usr/bin/env node
var argv = require('optimist')
.string('x', 'y')
.argv
;
console.dir([ argv.x, argv.y ]);
/* Turns off numeric coercion:
./node string.js -x 000123 -y 9876
[ '000123', '9876' ]
*/
exports.argv = function (options) {
var optimist = require('optimist').string('_');
if (options && Object.keys(options).length) {
optimist = optimist.options(options);
this.showOptions = optimist.help;
this.argv = optimist.argv;
}
else {
this.showOptions = optimist.help;
this.argv = optimist.argv;
}
};