Skip to content

Commit dd35b50

Browse files
committed
make it clearer where default ignore patterns originate
1 parent 91480aa commit dd35b50

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

lib/cli/transforms/addDefaultIgnorePatterns.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import {List} from "immutable";
22

3+
const defaultIgorePatterns = [
4+
/node_modules/,
5+
/bower_components/,
6+
/\.sass-cache/,
7+
/\.vscode/,
8+
/\.git/,
9+
/\.idea/
10+
];
11+
312
export function addDefaultIgnorePatterns(incoming) {
413
if (!incoming.get("watch")) {
514
return incoming;
@@ -11,16 +20,7 @@ export function addDefaultIgnorePatterns(incoming) {
1120
.filter(Boolean)
1221
.toSet();
1322

14-
const merged = userIgnored.merge([
15-
/node_modules/,
16-
/bower_components/,
17-
/\.sass-cache/,
18-
/\.vscode/,
19-
/\.git/,
20-
/\.idea/,
21-
"!node_modules/**/*",
22-
"!**/node_modules/**"
23-
]);
23+
const merged = userIgnored.merge(defaultIgorePatterns);
2424

2525
return watchOptions.merge({
2626
ignored: merged.toList(),

0 commit comments

Comments
 (0)