To emulate the live preview, there is a neat piece of software called entr[1], from their main page, you can do something like:
ls | entr make
And whenever you save a change, the build is triggered and the preview is updated.