How to use the options function from cli

Find comprehensive JavaScript cli.options code examples handpicked from public code repositorys.

57
58
59
60
61
62
63
64
65
66
    cli.getUsage(1);
} else {
    cli.options.pattern = cli.args.pop();
    var files = process.stdin;
    if (cli.options.name) {
        files.fileName = cli.options.name;
    }
    if (cli.args.length) {
        files = cli.args.reduce(function(files, pattern) {
            return files.concat(cli.glob.sync(path.join(cli.options.cwd, pattern)));
fork icon21
star icon195
watch icon6

+ 3 other calls in file

20
21
22
23
24
25
26
27
28
29
    })

if (!cli.args.length) {
    cli.getUsage(1)
} else {
    cli.options.pattern = cli.args.length > 1 ? cli.args.pop() : null

    if (cli.args.length) {
      files = cli.args.reduce(function(files, pattern) {
          return files.concat(cli.glob.sync(path.join(cli.options.cwd, pattern)))
fork icon11
star icon52
watch icon4

+ 7 other calls in file

68
69
70
71
72
73
74
75
76
77
  cli.enable('version', 'help');

  cli.parse(options);


  return cli.options;
};

  /*
  command.option(
fork icon1
star icon10
watch icon1

+ 9 other calls in file

15
16
17
18
19
20
21
22
23
24
switch (cli.command) {
        case 'angular':

                var command = 'bash ' + path.normalize(__dirname + '/../lib/angular/install.sh') + ' '
                        + path.normalize(__dirname + '/../lib/angular') + ' '
                        + path.join(process.env.PWD, cli.options.directory || 'www');

                var child = run(command);

                child.stdout.on('data', function(data) {
fork icon0
star icon0
watch icon1

+ 15 other calls in file