How to use the globby.generateGlobTasks function in globby

To help you get started, we’ve selected a few globby examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DevExpress / testcafe / src / utils / parse-file-list.js View on Github external
async function execFileGlobs (globs, baseDir) {
    // NOTE: We have to create glob tasks, execute them and sort their results separately to preserve the same item order
    // as in the older globby versions (<7.1.1)
    const tasks = globby.generateGlobTasks(globs, { cwd: baseDir, expandDirectories: false, onlyFiles: true });
    const files = await Promise.all(tasks.map(getFiles));

    return flatten(files);
}

globby

User-friendly glob matching

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis