One of my favourite tools now is modd.
Why is it so great? It does one job, and it does it well, in proper unix fashion.
Monitoring a file-system and running a daemon that reloads if anything changes.
Also in proper Unix fashion, the daemon is sent a configurable SIGHUP
when a file changes.
The portable configuration allows building or running a daemon based on changes.
Live reloading this blog:
# rebuild the theme web resources, excluding already built content
"themes/coda/**/*.{scss,js,css,jpg,jpeg,png,svg,gif}" !**/public/** !**/static/** {
prep: yarn --cwd themes/coda build
}
# rebuild the app web resources, excluding already built content
"**/*.{scss,js,css,jpg,jpeg,png,svg,gif}" !**/public/** !**/static/** !**/themes/coda/** {
prep: yarn theme
}
# rebuild the main html files, excluding built files
# and run the dev server
**/*.html **/*.md !**/public/** **/static/** {
daemon: hugo server -p ${PORT:-1337}
}