Codemod is a tool/library to assist you with large-scale codebase refactors that can be partially automated but still require human oversight and occasional intervention. Codemod was developed at Facebook and released as open source.
Apache License 2.0
4.11k
stars
198
forks
source link
Add Unix-style wildcard support to exclude-paths #82
This lets you write --exclude-paths='*/node_modules/*' and filter out all JS dependencies, for example, in not just the current directory but all subdirectories too. That way if you have dir1/node_modules and dir2/node_modules under your working directory, both get filtered out.
Test Plan: Added a sample snippet to the docblock for the path_filter function. Ran it and the existing snippets and got the same expected output.
This lets you write
--exclude-paths='*/node_modules/*'
and filter out all JS dependencies, for example, in not just the current directory but all subdirectories too. That way if you havedir1/node_modules
anddir2/node_modules
under your working directory, both get filtered out.Test Plan: Added a sample snippet to the docblock for the
path_filter
function. Ran it and the existing snippets and got the same expected output.