-
Notifications
You must be signed in to change notification settings - Fork 305
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
Feature: watch local themes, stylesheets and templates for changes #128
Comments
Yeah, that would be a very nice addition. In the meantime, I'm using chokidar-cli to watch for all the changes, and restart the generation. |
@ninjawule can you share, please, command you are using for others to reference? |
Yup, I'm using chokidar-cli like this:
With chokidar, I'm monitoring the MD file, but also the CSS file, and when one of them changes, the command given with the -c option is run. The tradeoff for doing this is that the live reload does not seem to work anymore. Maybe I should try letting the "watch" option in the cleaver command, I don't know. But I prefer reloading my browser rather than killing the cleaver process to restart it each time I change my CSS, which happens quite a lot in my case. |
There's a PR that does some of this in #161 |
Thank you, please feel free to close this issue once that PR is merged. |
cleaver watch
should rebuild on changes to a template, style, or any file included as part of a theme. I know #120 added support for watching stylesheets if passed with--style
arg, but this should be implemented for files mentioned in the YAML front matter as well.This will not be feasible for themes pulled from remote repositories, but we can check if the theme is in a local directory, and then watch every theme-related file for changes.
The text was updated successfully, but these errors were encountered: