Skip to content

Commit 7fcd045

Browse files
committed
Ignore .DS_Store files as well as folders
They were previously only being ignored if they were folders, but these things are typically files, not folders. Via: https://twitter.com/feross/status/1144708835770167297
1 parent 8d85a56 commit 7fcd045

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const defaultRules = [
3434
'npm-debug.log',
3535
'**/.npmrc',
3636
'.*.swp',
37+
'.DS_Store',
3738
'**/.DS_Store/**',
3839
'._*',
3940
'**/._*/**',

test/include-gitignore.js

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ t.test('setup', t => {
3838
'!.gitignore'
3939
)
4040

41+
fs.writeFileSync(
42+
path.join(pkg, '/.DS_Store'),
43+
'do not include me'
44+
)
45+
4146
fs.writeFileSync(
4247
path.join(pkg, 'package.json'),
4348
JSON.stringify(json, null, 2)

0 commit comments

Comments
 (0)