{"name":"@cspell/cspell-pipe","version":"5.21.2","keywords":["cspell","pipe","Iterator","Iterable","AsyncIterator","AsyncIterable"],"author":{"name":"Jason Dent","email":"jason@streetsidesoftware.nl"},"license":"MIT","_id":"@cspell/cspell-pipe@5.21.2","maintainers":[{"name":"jason-dent","email":"jason@streetsidesoftware.nl"}],"homepage":"https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-pipe#readme","bugs":{"url":"https://github.com/streetsidesoftware/cspell/labels/cspell-gitignore"},"dist":{"shasum":"7adfbc66426ee28549fd72a39deec7b98a76b320","tarball":"http://registry-npm.ywwl.com/@cspell/cspell-pipe/download/@cspell/cspell-pipe-5.21.2.tgz","fileCount":39,"integrity":"sha512-MN1SXeqqurWYNknbUMPHRFyTvURbO53/1Aw3zEoCeVUSiGbD5rrb1N+t0YDbOphWrkkrJAZk82/2ZBJ2USE/vg==","signatures":[{"sig":"MEUCIGSTBZ5lp287xzZo5s+xn8AbyUnW291FrfPI7XaP2YeLAiEAjAAVABqzNMbgjA1cIDekuJJAPg5aofpLJfl1fpX3uRs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiiTWKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmraaw/+PsFcwChLrJqqXk9wd6UlMM6Y0uBQ+ZnjNsD8Oq/HJuIR1rMQ\r\nHLbH+Bk7A0eTkl80CrrS/3OJBzdTNuFLZ9zqXVay1hE7xmdluqsgVAUcEtu8\r\n2RPo308xafUiPKUWi/OBNoc8cynplHVJDYb3Ne0ck1V4PjPSX/gjEcDVnMcx\r\naPy1OZkjypRYVsopj3jlMTKYbkEwY1cEXrKmppE4ITF278QhNU7zFMCc9pVX\r\nw0LxDfskjoTaFyWIdHp3MLQltdxgdKZdc3qr7qcU1F5LsFciASx5VDLVUi9f\r\npJzN+DfGJFmJ9MLRGhh4/qB1Amahcdi8k2U9/h4TYBOG29RWhzE5hv1xQPdw\r\nSnr1GPSFWZ7Wp12mDOtN1NcyqFFZt/V3nz1tJnFfHlpsypJ8azUE2q3pQZt/\r\nKdSytLoVA7FdkMN/6M4McVpwDLX6u28JtAq7fiRwQcQvtWPcSv9SEZhYkXbR\r\nFmO7b5RTRorqIN4B2Pyu1K+HebIAJ37d+CA9xdsl278DXFPji7zRIOQ8qDpz\r\n44pXzY0+jBkPJZYfQwOWeFp8p8ByyXoGxWmzRebbBNX9nm5Jh4SYitKNasIe\r\nAemq2+sIrcaqgwiswqs+J1psGkr+lQVjw59k/z1uh9xPfYO6EAFj/Y7lfefM\r\nF7QKmkUMfSpWzYRLTDTVdjJZIoJBXdZhp/I=\r\n=2AZi\r\n-----END PGP SIGNATURE-----\r\n","size":7552,"noattachment":false,"key":"/@cspell/cspell-pipe/-/@cspell/cspell-pipe-5.21.2.tgz"},"main":"dist/index.js","readme":"# `@cspell/cspell-pipe`\n\nA library to assist with working with Iterables and AsyncIterables\n\n## Install\n\n```sh\nnpm install -S @cspell/cspell-pipe\n```\n\n## Usage\n\n```ts\nimport { GitIgnore, findRepoRoot } from 'cspell-gitignore';\n\n// ...\n\nconst cwd = process.cwd();\nconst root = (await findRepoRoot(cwd)) || cwd;\nconst gitIgnore = new GitIgnore([root]);\n\nconst allFiles = glob('**');\n\nconst files = await gitIgnore.filterOutIgnored(allFiles);\n```\n\n## Logic\n\n- For each file, search for the `.gitignore` files in the directory hierarchy.\n- Ignore any files that match the globs found in the `.gitignore` files.\n\nThe `.gitignore` globs are evaluated from highest to lowest, matching the `git` behavior.\n\nTo prevent searching higher in the directory hierarchy, specify roots:\n\n```ts\nconst gitIgnore = new GitIgnore([process.cwd()]);\n```\n\n# `cspell-gitignore` CLI\n\n`cspell-gitignore` provides a simple cli for debugging .gitignore issues.\n\nIn most cases it should provide the same output as `git check-ignore`.\n\n## Usage\n\n```text\nUsage cspell-gitignore [options] <files>\n\nCheck files against .gitignore\nCompare against git check-ignore -v -n <files>\n\nOptions:\n  -r, --root   Add a root to prevent searching for .gitignore files above the root if the file is under the root.\n               This option can be used multiple times to add multiple roots. The default root is the current\n               repository root determined by the `.git` directory.\n\nExample:\n  cspell-gitignore README.md\n  cspell-gitignore -r . node_modules\n\n```\n\n## Example:\n\n```sh\n$ cspell-gitignore -r . node_modules\n.gitignore:58:node_modules/       node_modules\n```\n","engines":{"node":">=12.13.0"},"exports":{".":{"require":"./dist/index.js"},"./*":{"require":"./dist/*.js"},"./index":"./dist/index.js","./index.js":"./dist/index.js","./operators":{"require":"./dist/operators/index.js"},"./index.d.ts":"./dist/index.d.ts","./operators/index.js":{"require":"./dist/operators/index.js"},"./operators/index.d.ts":{"require":"./dist/operators/index.js"}},"gitHead":"ce422e9d62a5fbad056c4f82aafcbf98c6a86677","scripts":{"test":"jest","build":"tsc -p .","clean":"rimraf dist coverage .tsbuildinfo","watch":"tsc -p . -w","coverage":"jest --coverage","build-dev":"tsc -p tsconfig.dev.json","test-watch":"jest --watch","clean-build":"npm run clean && npm run build"},"typings":"dist/index.d.ts","_npmUser":{"name":"jason-dent","email":"jason@streetsidesoftware.nl"},"repository":{"url":"git+https://github.com/streetsidesoftware/cspell.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+x64 (darwin)","description":"Library to make working with Iterators/AsyncIterators easier.","directories":{"dist":"dist"},"_nodeVersion":"16.14.2","publishConfig":{"access":"public"},"typesVersions":{"*":{"*":["dist/*","dist/*/index.d.ts"],"operators":["dist/operators/index.d.ts"],"index.d.ts":["dist/index.d.ts"],"operators/*.js":["dist/operators/*.d.ts"],"dist/index.d.ts":["dist/index.d.ts"],"operators/index.d.ts":["dist/operators/index.d.ts"]}},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^28.1.0","rimraf":"^3.0.2","@types/node":"^17.0.35"},"_npmOperationalInternal":{"tmp":"tmp/cspell-pipe_5.21.2_1653159306132_0.8732906917186962","host":"s3://npm-registry-packages"},"publish_time":1653159306291,"_cnpm_publish_time":1653159306291,"dist-tags":{"cspell5":"5.21.2","cspell5-next":"5.21.2-alpha.0","latest":"10.4.1","next":"10.4.0-alpha.1"}}