site_opytex/theme/node_modules/glob-stream
Bertrand Benjamin 5b475a2f38 Feat: import work and verify compilation 2020-06-24 08:26:04 +02:00
..
node_modules Feat: import work and verify compilation 2020-06-24 08:26:04 +02:00
LICENSE Feat: import work and verify compilation 2020-06-24 08:26:04 +02:00
README.md Feat: import work and verify compilation 2020-06-24 08:26:04 +02:00
index.js Feat: import work and verify compilation 2020-06-24 08:26:04 +02:00
package.json Feat: import work and verify compilation 2020-06-24 08:26:04 +02:00

README.md

glob-stream NPM version Build Status Coveralls Status Dependency Status

Information

Packageglob-stream
Description File system globs as a stream
Node Version >= 0.9

This is a simple wrapper around node-glob to make it streamy.

Usage

var gs = require('glob-stream');

var stream = gs.create("./files/**/*.coffee", {options});

stream.on('data', function(file){
  // file has path, base, and cwd attrs
});

You can pass any combination of globs. One caveat is that you can not only pass a glob negation, you must give it at least one positive glob so it knows where to start. All given must match for the file to be returned.

Options

  • cwd
    • Default is process.cwd()
  • base
    • Default is everything before a glob starts (see glob2base)
  • cwdbase
    • Default is false
    • When true it is the same as saying opt.base = opt.cwd

This argument is passed directly to node-glob so check there for more options

Glob

var stream = gs.create(["./**/*.js", "!./node_modules/**/*.*"]);