UNPKG

351 BJavaScriptView Raw
1var Ignore = require("../")
2Ignore({ 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
11function onIgnoreFile (e) {
12 console.error("adding ignore file", e.path)
13}