aboutsummaryrefslogtreecommitdiff
path: root/node_modules/glob-stream/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/glob-stream/README.md')
-rw-r--r--node_modules/glob-stream/README.md94
1 files changed, 61 insertions, 33 deletions
diff --git a/node_modules/glob-stream/README.md b/node_modules/glob-stream/README.md
index b0dbd4544..0481dcc21 100644
--- a/node_modules/glob-stream/README.md
+++ b/node_modules/glob-stream/README.md
@@ -1,30 +1,21 @@
-# glob-stream [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url]
+<p align="center">
+ <a href="http://gulpjs.com">
+ <img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
+ </a>
+</p>
+# glob-stream
-## Information
+[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
-<table>
-<tr>
-<td>Package</td><td>glob-stream</td>
-</tr>
-<tr>
-<td>Description</td>
-<td>File system globs as a stream</td>
-</tr>
-<tr>
-<td>Node Version</td>
-<td>>= 0.9</td>
-</tr>
-</table>
-
-This is a simple wrapper around node-glob to make it streamy.
+A wrapper around [node-glob][node-glob-url] to make it streamy.
## Usage
```javascript
var gs = require('glob-stream');
-var stream = gs.create("./files/**/*.coffee", {options});
+var stream = gs.create('./files/**/*.coffee', { /* options */ });
stream.on('data', function(file){
// file has path, base, and cwd attrs
@@ -33,35 +24,72 @@ stream.on('data', function(file){
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.
+## API
+
+### create(globs, options)
+
+Returns a stream for multiple globs or filters.
+
+### createStream(positiveGlob, negativeGlobs, options)
+
+Returns a stream for a single glob or filter.
+
### Options
- cwd
- Default is `process.cwd()`
- base
- - Default is everything before a glob starts (see [glob2base](https://github.com/wearefractal/glob2base))
+ - Default is everything before a glob starts (see [glob-parent][glob-parent-url])
- cwdbase
- Default is `false`
- When true it is the same as saying opt.base = opt.cwd
+- allowEmpty
+ - Default is `false`
+ - If true, won't emit an error when a glob pointing at a single file fails to match
+- Any through2 related options are documented in [through2][through2-url]
-This argument is passed directly to [node-glob](https://github.com/isaacs/node-glob) so check there for more options
+This argument is passed directly to [node-glob][node-glob-url] so check there for more options
-#### Glob
+### Glob
-```javascript
-var stream = gs.create(["./**/*.js", "!./node_modules/**/*.*"]);
+```js
+var stream = gs.create(['./**/*.js', '!./node_modules/**/*']);
+```
+
+Globs are executed in order, so negations should follow positive globs. For example:
+
+```js
+gulp.src(['!b*.js', '*.js'])
+```
+
+would not exclude any files, but this would
+
+```js
+gulp.src(['*.js', '!b*.js'])
```
-[npm-url]: https://npmjs.org/package/glob-stream
-[npm-image]: https://badge.fury.io/js/glob-stream.png
+## Related
+
+- [globby][globby-url] - Non-streaming `glob` wrapper with support for multiple patterns.
+
+## License
+
+MIT
+
+[globby-url]: https://github.com/sindresorhus/globby
+[through2-url]: https://github.com/rvagg/through2
+[node-glob-url]: https://github.com/isaacs/node-glob
+[glob-parent-url]: https://github.com/es128/glob-parent
-[travis-url]: https://travis-ci.org/wearefractal/glob-stream
-[travis-image]: https://travis-ci.org/wearefractal/glob-stream.png?branch=master
+[downloads-image]: http://img.shields.io/npm/dm/glob-stream.svg
+[npm-url]: https://www.npmjs.com/package/glob-stream
+[npm-image]: https://badge.fury.io/js/glob-stream.svg
-[coveralls-url]: https://coveralls.io/r/wearefractal/glob-stream
-[coveralls-image]: https://coveralls.io/repos/wearefractal/glob-stream/badge.png
+[travis-url]: https://travis-ci.org/gulpjs/glob-stream
+[travis-image]: https://travis-ci.org/gulpjs/glob-stream.svg?branch=master
-[depstat-url]: https://david-dm.org/wearefractal/glob-stream
-[depstat-image]: https://david-dm.org/wearefractal/glob-stream.png
+[coveralls-url]: https://coveralls.io/r/gulpjs/glob-stream
+[coveralls-image]: https://coveralls.io/repos/gulpjs/glob-stream/badge.svg
-[david-url]: https://david-dm.org/wearefractal/glob-stream
-[david-image]: https://david-dm.org/wearefractal/glob-stream.png?theme=shields.io
+[gitter-url]: https://gitter.im/gulpjs/gulp
+[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png