brfs
brfs copied to clipboard
Add 'include' and 'exclude' options for more fine-tuned control over brfs'd files
I have a project where I need to exclude certain source files from being transformed by brfs (due to various reasons). I found many issues where people have similar needs, e.g. #76 #70 #55 #41.
This pull request adds support for opts.include and opts.exclude, both taking a minimatch pattern, which is matched against the source file path being transformed. Minimatch was already a dependency by browserify#glob.
Usage examples:
browserify -g [ brfs --exclude '**/node_modules/problematic/*' ] ...
browserify -g [ brfs --include '**/src/foo/bar/**' ] ...
I also added .editorconfig, which helps other contributors to maintain the formatting style of the project (e.g. disable whitespace trimming).
What about this?