Skip to content
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

elmstatic watch deletes the whole _site dir #14

Open
eimfach opened this issue Oct 29, 2019 · 2 comments
Open

elmstatic watch deletes the whole _site dir #14

eimfach opened this issue Oct 29, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@eimfach
Copy link

eimfach commented Oct 29, 2019

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 ?

@alexkorban
Copy link
Owner

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.

@eimfach
Copy link
Author

eimfach commented Oct 29, 2019

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants