Skip to content

Commit e5c2675

Browse files
refackBridgeAR
authored andcommitted
build,meta: rearrange and narrow git ignore rules
PR-URL: #27954 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent e8bedd2 commit e5c2675

File tree

1 file changed

+80
-77
lines changed

1 file changed

+80
-77
lines changed

.gitignore

Lines changed: 80 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
# Whitelist dotfiles
1+
# Please take extra care not to add rules that will make tracked files ignored.
2+
# To test that, run `git ls-files -i --exclude-standard`.
3+
# To check why a specific file is ignored, run `git check-ignore -v <filepath>`.
4+
5+
# === Rule for dotfiles ===
6+
# Ignore all dotfiles.
27
.*
8+
# Exclude specific dotfiles that we want to track.
39
!deps/**/.*
410
!test/fixtures/**/.*
5-
!tools/node_modules/**/.*
6-
!tools/doc/node_modules/**/.*
711
!.clang-format
812
!.editorconfig
913
!.eslintignore
@@ -19,109 +23,108 @@
1923
!.eslintrc.yaml
2024
!.cpplint
2125

22-
core
23-
vgcore.*
24-
v8*.log
25-
perf.data
26-
perf.data.old
27-
tags
28-
*.pyc
29-
doc/api.xml
30-
tmp/
31-
test/tmp*/
32-
iojs
33-
iojs_g
34-
node
35-
node_g
36-
*.swp
37-
icu_config.gypi
38-
node_trace.*.log
39-
coverage/
40-
!**/node_modules/**/coverage
41-
26+
# === Rules for root dir ===
27+
/core
28+
/vgcore.*
29+
/v8*.log
30+
/perf.data
31+
/perf.data.old
32+
/tags
33+
/doc/api.xml
34+
/node
35+
/node_g
36+
/*.exe
37+
/*.swp
4238
/out
39+
/*.txt
40+
41+
# === Rules for artifacts of `./configure` ===
42+
/icu_config.gypi
43+
/config.gypi
44+
/config.status
45+
/config_fips.gypi
4346

44-
# various stuff that VC++ produces/uses and is not in /out
47+
# === Rules for MSVS artifacts ===
4548
/Debug
4649
/Release
47-
!doc/blog/**
4850
*.sln
49-
!nodemsi.sln
5051
*.suo
51-
*.vcxproj
52-
!custom_actions.vcxproj
53-
*.vcxproj.user
54-
*.vcxproj.filters
52+
*.vcxproj*
5553
UpgradeLog*.XML
5654
_UpgradeReport_Files/
5755
*.sdf
5856
*.opensdf
59-
*.VC.db
60-
*.VC.opendb
61-
/*.exe
57+
*.VC.*
58+
*.wixobj
59+
/tools/msvs/genfiles/
60+
/npm.wxs
61+
# Exclude MSVS files used for .msi file generation
62+
!tools/msvs/msi/custom_actions.vcxproj
63+
!tools/msvs/msi/nodemsi.sln
6264

63-
/config.mk
64-
/config.gypi
65-
/config.status
66-
/config_fips.gypi
65+
# === Rules for GYP artifacts ===
6766
*-nodegyp*
68-
/gyp-mac-tool
69-
/npm.wxs
70-
/tools/msvs/npm.wixobj
71-
/tools/msvs/genfiles/
67+
/gyp-*-tool
7268
/test/addons/??_*/
73-
email.md
74-
deps/v8-*
75-
deps/icu
76-
deps/icu*.zip
77-
deps/icu*.tgz
78-
deps/icu-tmp
79-
./node_modules
80-
android-toolchain/
69+
/*.mk
8170

71+
# === Rules for other build artifacts ===
72+
/email.md
73+
/deps/v8-*
74+
/deps/icu
75+
/deps/icu*.zip
76+
/deps/icu*.tgz
77+
/deps/icu-tmp
78+
./node_modules
79+
/android-toolchain/
8280
# generated by gyp on Windows
83-
deps/openssl/openssl.props
84-
deps/openssl/openssl.targets
85-
deps/openssl/openssl.xml
86-
81+
/deps/openssl/openssl.props
82+
/deps/openssl/openssl.targets
83+
/deps/openssl/openssl.xml
8784
# generated by gyp on android
8885
/*.target.mk
8986
/*.host.mk
90-
deps/openssl/openssl.target.mk
91-
deps/zlib/zlib.target.mk
92-
93-
!deps/npm/node_modules
94-
# not needed and causes issues for distro packagers
95-
deps/npm/node_modules/.bin/
87+
/deps/openssl/openssl.target.mk
88+
/deps/zlib/zlib.target.mk
9689

97-
# build/release artifacts
90+
# === Rules for release artifacts ===
9891
/*.tar.*
9992
/*.pkg
10093
/SHASUMS*.txt*
10194

102-
# api docs artifacts
103-
tools/doc/node_modules
104-
105-
# clang-format artifacts
106-
tools/clang-format/node_modules
95+
# === Rules for `node_modules` ===
96+
!**/node_modules/**
97+
/node_modules
98+
/tools/doc/node_modules
99+
/tools/clang-format/node_modules
107100

108-
# test artifacts
109-
icu_config.gypi
110-
*.tap
101+
# === Rules for test artifacts ===
102+
/*.tap
111103
/*.xml
104+
/node_trace.*.log
105+
# coverage related
106+
/gcovr
107+
/build
112108

113-
# Xcode workspaces and project folders
109+
# === Rules for XCode artifacts ===
114110
*.xcodeproj
115111
*.xcworkspace
112+
*.pbxproj
116113

117-
# libuv book and GitHub template
118-
deps/uv/.github/
119-
deps/uv/docs/code/
120-
deps/uv/docs/src/guide/
121-
122-
# do not override V8's .gitignore
114+
# === Rules for files in `/deps` ===
115+
# Exclude all files in the vendored `npm`.
116+
!/deps/npm/node_modules
117+
# These are not needed and causes issues for distro packagers.
118+
/deps/npm/node_modules/.bin/
119+
# Respect V8's .gitignore
123120
!deps/v8/**
124-
# ignore VS compiler output unhandled by V8's .gitignore
125-
deps/v8/third_party/eu-strip/
121+
# Ignore the libuv book and GitHub templates
122+
/deps/uv/.github/
123+
/deps/uv/docs/code/
124+
/deps/uv/docs/src/guide/
126125

126+
# === Global Rules ===
127+
# Keep last to avoid being excluded
128+
*.pyc
129+
__pycache__
127130
.DS_Store

0 commit comments

Comments
 (0)