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

✨ Ignore specific file extension, files or directory from scanning #6

Closed
ravut8 opened this issue Sep 19, 2023 · 0 comments · Fixed by #12
Closed

✨ Ignore specific file extension, files or directory from scanning #6

ravut8 opened this issue Sep 19, 2023 · 0 comments · Fixed by #12
Assignees
Labels
enhancement Suggestions to improve Berryjam by modifying existing or adding new functionality

Comments

@ravut8
Copy link
Contributor

ravut8 commented Sep 19, 2023

Description

Currently, the scan is only for specific file extensions with a default exclusion set:

export const SUPPORT_EXT = [".vue", ".js", ".ts", ".tsx", ".jsx"];
export const DEF_IGNORE_FILES = [
"node_module",
"dist",
"build",
"cache",
".spec.",
".test.",
];

However, there is no way for a user to exclude additional files or directories from being scanned.

Why is this feature needed? Is there a problem that you faced?

  1. Test examples or code examples are not part of a project's components so scanning them may cause results to be inaccurate
  2. For large repositories, more custom exclusion allows for faster scan
  3. Allow users more detailed control on what should or should not be scanned.

What is the solution you have in mind?

A method that allow developers to specify file extensions, file paths and directory paths to ignore from scanning. It may be added as Step 0 wrapped within the scan method.

Additional Information

At the moment, there is an interface for the VueScannerOption but the method is not yet developed.

@ravut8 ravut8 added the enhancement Suggestions to improve Berryjam by modifying existing or adding new functionality label Sep 19, 2023
ravut8 pushed a commit that referenced this issue Sep 25, 2023
#12)

* feat: add ignore logic for scan file paths in the `collectVueComponents` method

* test(ignoreOption): add 2 test cases for ignoring files and folders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggestions to improve Berryjam by modifying existing or adding new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants