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

Config based on file extensions instead of profiles #5

Closed
RobertLang opened this issue Dec 15, 2020 · 3 comments · Fixed by #6
Closed

Config based on file extensions instead of profiles #5

RobertLang opened this issue Dec 15, 2020 · 3 comments · Fixed by #6

Comments

@RobertLang
Copy link
Contributor

Hi,
we just recently discovered your project and it has helped us already in fixing those watcher issues under MacOS and Docker.
Unfortunately the profile definitions are a bit limited and are always missing the one or the other file type (for example *.scss in magento2)

So I would suggest to extend the configuration file to provide some sort ruleset for watched file extension:


watch:

  • dir: /tmp/watch1
  • dir: /tmp/watch2
    extensions:
  • "*.scss"
  • "*.js"
  • "*.twig"

I think this would make it easier to specifically watch the files needed for different technology types instead of having to watch all files if none of the given profiles match.

Thanks for considering,
Robert

@cmuench
Copy link
Owner

cmuench commented Dec 16, 2020

@RobertLang Yes, hat a similar idea but currenlty less time to refactor the tool.

My idea was to allow extension configuration for each directory.

in this way:

---
watch:
- dir: /tmp/watch1
  extensions:
  -  ".scss"
  - ".js"
  - ".twig"

- dir: /tmp/watch2
  extensions:
  -  ".foo"
  - ".bar"
  - ".js"

cmuench added a commit that referenced this issue Dec 30, 2020
Change config structure. Allow definition of extensions and a profile on directory level.

TODO: Find a solution to pass config entry in dir walker visit function.
@cmuench
Copy link
Owner

cmuench commented Dec 30, 2020

@RobertLang New feature is released.
https://github.com/cmuench/inotify-proxy/releases/tag/2.0.0

Example Config:

---
watch:
- directory: /tmp/watch1
  profile: magento2

- directory: /tmp/watch2
  profile: vue-storefront

- directory: /tmp/watch3
  extensions: [.css, .html]

@RobertLang
Copy link
Contributor Author

Thanks a lot :-)

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 a pull request may close this issue.

2 participants