summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
blob: ff4534289c2f57e6d859024b3c80be126e9be27d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var Ignore = require("../")
Ignore({ path: __dirname
       , ignoreFiles: [".ignore", ".gitignore"]
       })
  .on("child", function (c) {
    console.error(c.path.substr(c.root.path.length + 1))
    c.on("ignoreFile", onIgnoreFile)
  })
  .on("ignoreFile", onIgnoreFile)

function onIgnoreFile (e) {
  console.error("adding ignore file", e.path)
}