How to use the describe function from yargs

Find comprehensive JavaScript yargs.describe code examples handpicked from public code repositorys.

52
53
54
55
56
57
58
59
60
61
if ('alias' in option) {
  alias = option.alias;
  yargs = yargs.alias(alias, name);
}

yargs = yargs.describe(alias, option.description);

if ('default' in option) {
  const template = name.endsWith('-template');
  const def = template ? path.resolve(path.dirname(__dirname), option.default) : option.default;
fork icon257
star icon0
watch icon25

+ 13 other calls in file

9
10
11
12
13
14
15
16
17
18
var testApp = express();
var DEFAULT_PORT = process.env.HTTP_PORT || env.webServerDefaultPort;
var testAppDir = path.resolve(__dirname, '..');
var defaultAngular = require(path.resolve(testAppDir, 'ng1/lib/angular_version.js'));

var argv = yargs.describe('port', 'port').
    default('port', DEFAULT_PORT).
    describe('ngversion', 'version of AngularJS to use').
    default('ngversion', defaultAngular).
    argv;
fork icon0
star icon0
watch icon500

+ 25 other calls in file

Other functions in yargs

Sorted by popularity

function icon

yargs.argv is the most popular function in yargs (1012 examples)