Open neelabhg opened 9 years ago
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:
chokidar 'my_folder/my_doc.md' 'my_folder/my_doc.css' --initial --silent \
-c 'cleaver --debug my_folder/my_doc.md --title "My HTML Title" --output my_folder/my_doc.html --theme jdan/cleaver-retro --style my_folder/my_doc.css'
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.