Tired of wasting gigabytes of Time Machine storage to node_modules folders?

Time Machine supports setting a sticky extended attribute on folders to exclude them from backups.

It works great, and I believe NPM should support it.

I opened an NPM RFC and would love your comments on it: https://github.com/npm/rfcs/pull/857/changes

In the mean time, you can easily set the bit w/ a command like:

xattr -w com.apple.metadata:com_apple_backup_excludeItem com.apple.backupd /path/to/node_modules/

Let鈥檚 do this!

GitHub - stevegrunwell/asimov: Automatically exclude development dependencies from Apple Time Machine backups

Automatically exclude development dependencies from Apple Time Machine backups - stevegrunwell/asimov

GitHub

@holtwick Nice! I have hesitated to do something like this, but having a script periodically traverse the whole file system breaks my heart a bit 馃槄.

It should be the package manager鈥檚 job to do this. e.g. Rust cargo already does https://github.com/rust-lang/cargo/pull/4386

Exclude target directory from Time Machine by kornelski 路 Pull Request #4386 路 rust-lang/cargo

Fixes #3884

GitHub

@meego I agree 100%! Great effort! Hope it get's through.

I referenced your PR at PNPM, which I use mostly ;)
https://github.com/pnpm/pnpm/issues/6440

node_module excluded from MacOS TimeMachine backup with extended attribute 路 Issue #6440 路 pnpm/pnpm

I'd be willing to implement this feature (contributing guide) Describe the user story As a developer working on a macOS computer, I want to ensure that all node_module folders created as part of th...

GitHub