Skip to content

Commit faf97ea

Browse files
Merge pull request #953 from LAF-US/claude/gitignore-node-modules-qzt7le
Keep a root node_modules out of the vault
2 parents bd715c2 + 1226741 commit faf97ea

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,19 @@ desktop.ini
159159
!*.md
160160

161161
# ESTO PERPETUA!
162+
163+
# === ROOT node_modules IS A BUILD ARTIFACT =================================
164+
# Last rule in the file, and it must stay last: git takes the LAST matching
165+
# pattern, so this has to come after the markdown re-include above to beat it.
166+
#
167+
# The markdown rule is right for THE-GEMSTONE/node_modules, which is vendored
168+
# CONTENT this vault tracks on purpose (49 .md files). It is wrong for a root
169+
# node_modules, which npm regenerates from package-lock.json and which nobody
170+
# should ever commit.
171+
#
172+
# Measured with `git add --dry-run node_modules/`: 2 files leak with main's
173+
# dependencies today (prettier only), 466 with the eight devDependencies #950
174+
# adds. Both are vendored README files nobody wants in the vault.
175+
#
176+
# Leading slash = root only. THE-GEMSTONE/node_modules is untouched.
177+
/node_modules/**

0 commit comments

Comments
 (0)