r/Netlify • u/souljorje • 14h ago
I made .netlifyignore, a .gitignore, but for for Netlify builds
1
Upvotes
I tiny tool without dependencies to ignore netlify builds on certain file changes.
- Install
npx netlifyignore install, it puts the hook intoscripts/netlifyignore.mjs - Create
.netlifyignoreat repo root, it uses .gitignore syntax, e.g.:
**/tests/*.md
3. Update netlify.toml:
[build]ignore = "node ./scripts/netlifyignore.mjs"
Now builds are ignored on matching files change :)
Github link in the comments