elmstatic
elmstatic copied to clipboard
elmstatic watch deletes the whole _site dir
Hi there, I want to use the watch mode with postcss, but 'elmstatic watch' deletes the whole _site directory, which leads to awkward behaviour when I am also generating css via postcss-cli into the _site directory. Would it be possible to only copy the file which actually changed ?
I tried going down that road but it's not straightforward (eg changing a post also changes the post list, and all the related tag pages). I discuss it in this post: https://korban.net/posts/elm/2019-07-09-elmstatic-better-performance-live-reload/
I'd be willing to consider a PR though.
Hm yes, I see. So in general it is not easy for me what happens under the hood... do you generate the html with the elm runtime running in node.js and providing the dom via js-dom?
also, I think it could be possible to to be explicit which folders are wiped in the _site dir. If I understand that correctly you could only wipe the directories with .html files ?