Initial commit
[yaffs-website] / node_modules / glob-stream / README.md
1 # 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]
2
3
4 ## Information
5
6 <table>
7 <tr> 
8 <td>Package</td><td>glob-stream</td>
9 </tr>
10 <tr>
11 <td>Description</td>
12 <td>File system globs as a stream</td>
13 </tr>
14 <tr>
15 <td>Node Version</td>
16 <td>>= 0.9</td>
17 </tr>
18 </table>
19
20 This is a simple wrapper around node-glob to make it streamy.
21
22 ## Usage
23
24 ```javascript
25 var gs = require('glob-stream');
26
27 var stream = gs.create("./files/**/*.coffee", {options});
28
29 stream.on('data', function(file){
30   // file has path, base, and cwd attrs
31 });
32 ```
33
34 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.
35
36 ### Options
37
38 - cwd
39   - Default is `process.cwd()`
40 - base
41   - Default is everything before a glob starts (see [glob2base](https://github.com/wearefractal/glob2base))
42 - cwdbase
43   - Default is `false`
44   - When true it is the same as saying opt.base = opt.cwd
45
46 This argument is passed directly to [node-glob](https://github.com/isaacs/node-glob) so check there for more options
47
48 #### Glob
49
50 ```javascript
51 var stream = gs.create(["./**/*.js", "!./node_modules/**/*.*"]);
52 ```
53
54 [npm-url]: https://npmjs.org/package/glob-stream
55 [npm-image]: https://badge.fury.io/js/glob-stream.png
56
57 [travis-url]: https://travis-ci.org/wearefractal/glob-stream
58 [travis-image]: https://travis-ci.org/wearefractal/glob-stream.png?branch=master
59
60 [coveralls-url]: https://coveralls.io/r/wearefractal/glob-stream
61 [coveralls-image]: https://coveralls.io/repos/wearefractal/glob-stream/badge.png
62
63 [depstat-url]: https://david-dm.org/wearefractal/glob-stream
64 [depstat-image]: https://david-dm.org/wearefractal/glob-stream.png
65
66 [david-url]: https://david-dm.org/wearefractal/glob-stream
67 [david-image]: https://david-dm.org/wearefractal/glob-stream.png?theme=shields.io