0.4.5 • Published 9 years ago

plumber-glob v0.4.5

Weekly downloads
2
License
GPL
Repository
github
Last release
9 years ago

plumber-glob Build Status

File globbing operation for Plumber pipelines.

Example

var glob = require('plumber-glob');

module.exports = function(pipelines) {

    pipelines['compile'] = [
        glob('src/**/*.js'),
        // ... more pipeline operations
    ];

};

API

glob(patterns...) or glob.pattern(patterns...)

Returns resources for all files matched by the list of patterns.

Patterns may include wildcards like * or ** (globstar).

See the minimatch documentation for the full available syntax.

Example:

var allHtml = glob('**/*.html'); // or glob.pattern('**/*.html')

glob.exclude(patterns...)

Returns a new glob function that excludes files patched by the patterns.

Example:

var globUnlessMinimised = glob.exclude('**/*.min.js');
var js = globUnlessMinimised("src/**/*.js");

glob.within(directory)

Returns a new glob function scoped within the given directory.

Example:

var sources = glob.within('src');
var htmlAndCss = sources("index.html", "styles/*.css");

var scripts = sources.within('scripts');
var js = sources("**/*.js");
0.4.5

9 years ago

0.4.4

9 years ago

0.4.3

9 years ago

0.4.2

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago