1 | # fstream-ignore
|
2 |
|
3 | A fstream DirReader that filters out files that match globs in `.ignore`
|
4 | files throughout the tree, like how git ignores files based on a
|
5 | `.gitignore` file.
|
6 |
|
7 | Here's an example:
|
8 |
|
9 | ```javascript
|
10 | var Ignore = require("fstream-ignore")
|
11 | Ignore({ path: __dirname
|
12 | , ignoreFiles: [".ignore", ".gitignore"]
|
13 | })
|
14 | .on("child", function (c) {
|
15 | console.error(c.path.substr(c.root.path.length + 1))
|
16 | })
|
17 | .pipe(tar.Pack())
|
18 | .pipe(fs.createWriteStream("foo.tar"))
|
19 | ```
|
20 |
|
21 | This will tar up the files in __dirname into `foo.tar`, ignoring
|
22 | anything matched by the globs in any .iginore or .gitignore file.
|