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 an option to ignore certain folders #47

Closed
Angelmmiguel opened this issue Nov 28, 2022 · 2 comments · Fixed by #126
Closed

Add an option to ignore certain folders #47

Angelmmiguel opened this issue Nov 28, 2022 · 2 comments · Fixed by #126
Assignees
Labels
🚀 enhancement New feature or request 👋 good first issue Good for newcomers

Comments

@Angelmmiguel
Copy link
Contributor

When running wws, it will fetch all the files in the given directory and subfolders. Sometimes, we may run the CLI in a folder, but we don't want to check all the folders inside it. For example, we want wws to be able to ignore node_modules folders in certain cases.

To make it configurable, we plan to add a new option to the CLI called --ignore. This --ignore option can be used multiple times to ignore several folders:

wws --ignore node_modules --ignore tmp .

Clap supports already supports this feature. The complexity of this issue comes from:

  • The support of Windows and Unix systems
  • Usage of Glob crate

Note that if we use the same approach we do for skipping the public folder, Glob will still list all the files in those folders. Folders lik node_modules can cause a performance issue as they may contain a big number of supported files (.js).

@Angelmmiguel Angelmmiguel added the 🚀 enhancement New feature or request label Nov 28, 2022
@assambar
Copy link
Contributor

assambar commented Dec 2, 2022

Could we use a .wwsignore file instead? Placed anywhere in a scanned folder tree (just like .gitignore)
It is more complex, but for different languages or frameworks that one uses to create their workers we might end up with bunches of different folder names that we want to ignore.
And if we have to provide all of them on the commandline it could become hard to maintain.

@Angelmmiguel
Copy link
Contributor Author

That's a good option. I would even rely in .gitgnore if it's present. However, I still think the option is useful as it can be a direct command: wws --ignore X ..

I also like the idea to take into account your .gitignore file. This allows to reuse an existing configuration so you don't need to create an extra file if it's created. Although, this may be confusing.

So, +1 on supporting the .wwsignore file + --ignore option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 enhancement New feature or request 👋 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants