Skip to content

Instantly share code, notes, and snippets.

View PhantomRay's full-sized avatar
😈
Incubation

Ray PhantomRay

😈
Incubation
  • Australia
  • 15:52 (UTC +10:00)
View GitHub Profile
@PhantomRay
PhantomRay / node_prune.sh
Last active March 10, 2021 13:17 — forked from gpittarelli/node_prune.sh
Prunes very-likely-uneeded files from node_modules directories
#!/usr/bin/env bash
# Port of https://github.com/tj/node-prune to bash
# Also,
# - fixed "*.ts" being overzealous and killing .d.ts files
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486
#
# See also:
# - https://github.com/timoxley/cruft
# - https://yarnpkg.com/en/docs/cli/autoclean
# - https://github.com/ModClean/modclean