Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'include' and 'exclude' options for more fine-tuned control over brfs'd files #82

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jholster
Copy link

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).

Both options take a minimatch pattern in a string, which is matched
against absolute path of the file being transformed.

Example:

browserify -g [ brfs --exclude '**/node_modules/problematic/*' ] ...
This helps contributors to keep the source format consistent,
e.g. preserving the whitespace indentation in empty lines.
@Llorx
Copy link

Llorx commented May 13, 2020

What about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants