lib/parsed-args.js
/**
 * If the current argument is the entry-file glob pattern,
 * then this function parses it and shifts it to {@link ParsedArgs#args}.
 *
 * @param {string[]} args - The command-line arguments that have not yet been parsed
 * @param {ParsedArgs} parsed - The command-line arguments that have already been parsed
 * @returns {boolean}
 */
If the current argument is the entry-file glob pattern,
then this function parses it and shifts it to  ParsedArgs#args.

@param {string[]} args - The command-line arguments that have not yet been parsed
@param {ParsedArgs} parsed - The command-line arguments that have already been parsed
@returns {boolean}
If the current argument is the entry - file glob pattern then this function parses it and shifts it to ParsedArgs#args . @param { string [] } args - The command - line arguments that have not yet been parsed @param { ParsedArgs } parsed - The command - line arguments that have already been parsed @returns { boolean }
function parseGlobs (args, parsed) {
  let patterns = [];
  if (parsed.globIndex === -1 && globby.hasMagic(args[0])) {
    while (args[0] && args[0][0] !== "-") {
      let pattern = args.shift();
      patterns.push(pattern);
      parsed.baseDir = parsed.baseDir || helpers.getBaseDir(pattern);
    }
    if (patterns.length) {
      parsed.globIndex = parsed.args.length;
      parsed.args.push((options) => {
        return globby.sync(patterns, options);
      });
    }
  }
  return !!patterns.length;
}
function parseGlobs ( args , parsed ) { let patterns = [ ] ; if ( parsed . globIndex === - 1 && globby . hasMagic ( args [ 0 ] ) ) { while ( args [ 0 ] && args [ 0 ] [ 0 ] !== "-" ) { let pattern = args . shift ( ) ; patterns . push ( pattern ) ; parsed . baseDir = parsed . baseDir || helpers . getBaseDir ( pattern ) ; } if ( patterns . length ) { parsed . globIndex = parsed . args . length ; parsed . args . push ( ( options ) => { return globby . sync ( patterns , options ) ; } ) ; } } return ! ! patterns . length ; }
If the current argument is the entry-file glob pattern,
 then this function parses it and shifts it to {@link ParsedArgs#args}.
If the current argument is the entry - file glob pattern then this function parses it and shifts it to { @link ParsedArgs#args } .
// We found an entry file glob pattern // Set the baseDir, if not already set // We found entry file(s), so set the glob index and create the glob function