async function globFiles({
  srcDir,
  glob,
}) {
  let files;
  let patterns;
  if (glob) {
    files = [];
    patterns = [];
    if (Array.isArray(srcDir)) {
      patterns = srcDir;
    } else {
      patterns = srcDir.split(' ');
    }

    for (const pattern of patterns) {
      let filePath = await GlobModule.glob(pattern);
      files.push(...filePath);
    }
  } else {
    files = srcDir;
  }
  return files;
}
Glob files.
@async
@function
@param  {object}            options         - glob file options
@param  {string | string[]} options.srcDir  - app src dir
@param  {boolean}           options.glob    - glob flag
@returns {Promise<string[]>}                 - Returns array of file paths