How to use the glob function from cli

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

47
48
49
50
51
52
53
54
55
56
var files = process.stdin;
if (cli.options.name) {
    files.fileName = cli.options.name;
}
if (cli.args.length) {
    files = cli.glob.sync(cli.args[0]);
}
hash(files, cli.options).on('end', function (map) {
    // Output hash
    if (!cli.options.silent) {
fork icon21
star icon0
watch icon2