How to use the alias function from yargs

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

-1
fork icon264
star icon0
watch icon76

49
50
51
52
53
54
55
56
57

// If the this is an option itself
if ('description' in option) {
  if ('alias' in option) {
    alias = option.alias;
    yargs = yargs.alias(alias, name);
  }

  yargs = yargs.describe(alias, option.description);
fork icon257
star icon0
watch icon25

+ 13 other calls in file

73
74
75
76
77
78
79
80
81
82
  process.exit(1);
})
yargs.demandCommand(1)

yargs.help('h')
yargs.alias('h', 'help')
yargs.alias('v', 'version')
yargs.env(meta.name.replace(/-/g, '').toUpperCase())

const argv = yargs.argv
fork icon13
star icon30
watch icon4

+ 3 other calls in file

48
49
50
51
52
53
54
55
56
57
58
app.use('/api/info', apiInfo);
var PRIVATE_KEY = 'sdf#R"#$&/(/(';
var yargs = require("yargs")(process.argv.slice(2));


// args//
var _yargs$alias$default$ = yargs.alias({
    p: 'puerto'
  })["default"]({
    puerto: 8080
  }).argv,
fork icon0
star icon0
watch icon0

Other functions in yargs

Sorted by popularity

function icon

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