@cspell/cspell-pipe 6.14.0 → 6.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +0 -61
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -7,64 +7,3 @@ A library to assist with working with Iterables and AsyncIterables
7
7
  ```sh
8
8
  npm install -S @cspell/cspell-pipe
9
9
  ```
10
-
11
- ## Usage
12
-
13
- ```ts
14
- import { GitIgnore, findRepoRoot } from 'cspell-gitignore';
15
-
16
- // ...
17
-
18
- const cwd = process.cwd();
19
- const root = (await findRepoRoot(cwd)) || cwd;
20
- const gitIgnore = new GitIgnore([root]);
21
-
22
- const allFiles = glob('**');
23
-
24
- const files = await gitIgnore.filterOutIgnored(allFiles);
25
- ```
26
-
27
- ## Logic
28
-
29
- - For each file, search for the `.gitignore` files in the directory hierarchy.
30
- - Ignore any files that match the globs found in the `.gitignore` files.
31
-
32
- The `.gitignore` globs are evaluated from highest to lowest, matching the `git` behavior.
33
-
34
- To prevent searching higher in the directory hierarchy, specify roots:
35
-
36
- ```ts
37
- const gitIgnore = new GitIgnore([process.cwd()]);
38
- ```
39
-
40
- # `cspell-gitignore` CLI
41
-
42
- `cspell-gitignore` provides a simple cli for debugging .gitignore issues.
43
-
44
- In most cases it should provide the same output as `git check-ignore`.
45
-
46
- ## Usage
47
-
48
- ```text
49
- Usage cspell-gitignore [options] <files>
50
-
51
- Check files against .gitignore
52
- Compare against git check-ignore -v -n <files>
53
-
54
- Options:
55
- -r, --root Add a root to prevent searching for .gitignore files above the root if the file is under the root.
56
- This option can be used multiple times to add multiple roots. The default root is the current
57
- repository root determined by the `.git` directory.
58
-
59
- Example:
60
- cspell-gitignore README.md
61
- cspell-gitignore -r . node_modules
62
-
63
- ```
64
-
65
- ## Example:
66
-
67
- ```sh
68
- $ cspell-gitignore -r . node_modules
69
- .gitignore:58:node_modules/ node_modules
70
- ```
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.14.0",
6
+ "version": "6.14.1",
7
7
  "description": "Library to make working with Iterators/AsyncIterators easier.",
8
8
  "keywords": [
9
9
  "cspell",
@@ -114,5 +114,5 @@
114
114
  "jest": "^29.2.2",
115
115
  "rimraf": "^3.0.2"
116
116
  },
117
- "gitHead": "9f5274766ae9e1e4796a7c10b78db4d98f04ea42"
117
+ "gitHead": "35db1ed216cd9aaf479429d3268482f30d824e70"
118
118
  }