How to use nopt

Comprehensive nopt code examples:

How to use nopt.argv:

27
28
29
30
31
32
33
34
35
36
37
    'shared': Boolean,
    'link': Boolean,
    'activity-name': [String, undefined]
}, { 'd': '--verbose' });


if (argv.help || argv.argv.remain.length === 0) {
    console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'create')) + ' <path_to_new_project> <package_name> <project_name> [<template_path>] [--activity-name <activity_name>] [--link]');
    console.log('    <path_to_new_project>: Path to your new Cordova Android project');
    console.log('    <package_name>: Package name, following reverse-domain style convention');
    console.log('    <project_name>: Project name');

How to use nopt.clean:

431
432
433
434
435
436
437
438
439
440
441
442
}


function validate (cl) {
  // warn about invalid configs at every level.
  cl.list.forEach(function (conf) {
    nopt.clean(conf, configDefs.types)
  })


  nopt.clean(cl.root, configDefs.types)
}