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 everything except repeated specific sub directories #2145

Closed
UROjQ6r80p opened this issue Nov 8, 2023 · 3 comments
Closed

ignore everything except repeated specific sub directories #2145

UROjQ6r80p opened this issue Nov 8, 2023 · 3 comments
Labels
stale no activity for 2 weeks

Comments

@UROjQ6r80p
Copy link

UROjQ6r80p commented Nov 8, 2023

How to make nodemon ignore everything in a folder, except nested sub directories? I want to ignore everything in src folder except every folder with name components (nested etc.)

so src/file.js, src/something/nested/file.js should be ignored,
but src/components/file.js, src/something/nested/components/file.js should not be ignored.

I tried ! but it doesn't work.

{
    "verbose": true,
    "ignore": [
        "vite.config.js.timestamp-*.mjs",
        "node_modules/",
        "src/!(**/components/**)",
        "dist/"
    ],
    "ext": "*"
}
Copy link

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

@github-actions github-actions bot added the stale no activity for 2 weeks label Nov 22, 2023
@remy
Copy link
Owner

remy commented Dec 1, 2023

@UROjQ6r80p honestly I'm not sure what the right globbing pattern is, but underneath it all, nodemon uses Chokidar for watch and (some) ignoring and that uses code that follows minimatch syntax, so you're best referring to those docs: https://github.com/micromatch/picomatch#advanced-globbing (and if I were you, I'd probably get the minimatch in a repl and see if I can get something that matches).

@remy remy closed this as completed Dec 1, 2023
@UROjQ6r80p
Copy link
Author

Yup, thanks I'll try.

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

No branches or pull requests

2 participants