How to use the glob.bind function in glob

To help you get started, we’ve selected a few glob 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 majgis / npm-bundle / index.js View on Github external
async.waterfall([
    rimraf.bind(null, tempDir),
    mkdirp.bind(null, tempDir),
    ignoreValue,
    resolvePath.bind(null, argAndOptions.arg),
    storeValue.bind(null, context, 'installable'),
    ncp.bind(null, templateDir, tempDir),
    getValue.bind(null, context, 'installable'),
    copyNpmrc.bind(null, tempDir),
    cd.bind(null, tempDir),
    getValue.bind(null, context, 'installable'),
    npmInstall.bind(null, verbose, argAndOptions.options),
    ignoreValue,
    cd.bind(null, 'node_modules'),
    glob.bind(null, '*'),
    checkLength,
    flatten,
    cd,
    rimraf.bind(null, '.npmbundle'),
    fs.readFile.bind(null, 'package.json', 'utf8'),
    jsonParse,
    bundleDependencies,
    disableScripts,
    jsonStringify,
    fs.writeFile.bind(null, 'package.json'),
    pwd,
    storeValue.bind(null, context, 'packable'),
    cd.bind(null, startDir),
    getValue.bind(null, context, 'packable'),
    npmPack.bind(null, verbose),
    storeValue.bind(null, context.output, 'file'),
github mixtur / webpack-spritesmith / lib / Plugin.js View on Github external
compile: function (compileCallback) {
        var src = this.options.src;

        var compileStrategy = this.useRetinaTemplates
            ? require('./compileRetina')
            : require('./compileNormal');

        async.waterfall([
            glob.bind(null, src.glob, {cwd: src.cwd}),
            compileStrategy.bind(null, this.options, this.metaOutput, this.isInitial),
            function (compiledFilesPaths, callback) {
                if (!compiledFilesPaths) {
                    return callback();
                }
                if (this.prevCompiledFilePaths) {
                    const jobs = [];
                    this.prevCompiledFilePaths.css.forEach(function (prevCss) {
                        if (!compiledFilesPaths.css.includes(prevCss)) {
                            jobs.push(fs.unlink.bind(fs, prevCss));
                        }
                    });
                    this.prevCompiledFilePaths.images.forEach(function (prevImgPath) {
                        if (!compiledFilesPaths.images.includes(prevImgPath)) {
                            jobs.push(fs.unlink.bind(fs, prevImgPath));
                        }