-
-
Save cwonrails/c1f43407c30de9e64c9c803555625191 to your computer and use it in GitHub Desktop.
Pruning useless node_modules with bash userland tools (find etc)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
find node_modules \( -name '__tests__' -o \ | |
-name 'tests' -o \ | |
-name 'powered-test' -o \ | |
-name 'docs' -o \ | |
-name 'doc' -o \ | |
-name '.idea' -o \ | |
-name '.vscode' -o \ | |
-name 'website' -o \ | |
-name 'images' -o \ | |
-name 'assets' -o \ | |
-name 'example' -o \ | |
-name 'examples' -o \ | |
-name 'coverage' -o \ | |
-name '.nyc_output' -o \ | |
-name 'Makefile' -o \ | |
-name '*ulpfile.js' -o \ | |
-name '*runtfile.js' -o \ | |
-name 'appveyor.yml' -o \ | |
-name 'circle.yml' -o \ | |
-name 'codeship*.yml' -o \ | |
-name 'wercker.yml' -o \ | |
-name '.tern-project' -o \ | |
-name '.gitattributes' -o \ | |
-name '.editorconfig' -o \ | |
-name '.*ignore' -o \ | |
-name '.eslintrc' -o \ | |
-name '.eslintrc.*' -o \ | |
-name '.jshintrc' -o \ | |
-name '.flowconfig' -o \ | |
-name '.documentup.json' -o \ | |
-name '.yarn-metadata.json' -o \ | |
-name '.travis.yml' -o \) -exec rm -rf {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment