Adam Rensel b05888e79d Add the correct demo app 10 роки тому
..
example 0ad841a423 init commit 10 роки тому
node_modules b05888e79d Add the correct demo app 10 роки тому
test 0ad841a423 init commit 10 роки тому
.npmignore 0ad841a423 init commit 10 роки тому
LICENSE 0ad841a423 init commit 10 роки тому
README.md 0ad841a423 init commit 10 роки тому
ignore.js 0ad841a423 init commit 10 роки тому
package.json b05888e79d Add the correct demo app 10 роки тому

README.md

fstream-ignore

A fstream DirReader that filters out files that match globs in .ignore files throughout the tree, like how git ignores files based on a .gitignore file.

Here's an example:

var Ignore = require("fstream-ignore")
Ignore({ path: __dirname
       , ignoreFiles: [".ignore", ".gitignore"]
       })
  .on("child", function (c) {
    console.error(c.path.substr(c.root.path.length + 1))
  })
  .pipe(tar.Pack())
  .pipe(fs.createWriteStream("foo.tar"))

This will tar up the files in __dirname into foo.tar, ignoring anything matched by the globs in any .iginore or .gitignore file.