1 | var Ignore = require("../")
|
2 | Ignore({ path: __dirname
|
3 | , ignoreFiles: [".ignore", ".gitignore"]
|
4 | })
|
5 | .on("child", function (c) {
|
6 | console.error(c.path.substr(c.root.path.length + 1))
|
7 | c.on("ignoreFile", onIgnoreFile)
|
8 | })
|
9 | .on("ignoreFile", onIgnoreFile)
|
10 |
|
11 | function onIgnoreFile (e) {
|
12 | console.error("adding ignore file", e.path)
|
13 | }
|