magnars / stasis

Some Clojure functions for creating static websites.
348 stars 27 forks source link

Hot code reloading #28

Closed vitkalisz closed 4 years ago

vitkalisz commented 4 years ago

I have build a project via your description, which went just fine, but I am not sure, how to do hot code reloading with stasis. Could you please help me?

magnars commented 4 years ago

For sure! The short answer is: just like you would do it normally.

You could use lein-ring, or tools-namespace to reset your app. I normally just evaluate namespaces into my repl on the fly.

How are you running it?

lør. 25. apr. 2020 kl. 14:20 skrev Vít Kalisz notifications@github.com:

I have build a project via your description, which went just fine, but I am not sure, how to do hot code reloading with stasis. Could you please help me?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/magnars/stasis/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACA4OPKDWASC6ETWDUGKSLROLIRPANCNFSM4MQXHKKQ .

vitkalisz commented 4 years ago

I would like to have the behavior similar to figwheel, so every saved change in arbitrary namespace would automatically reload the content to match the current version and also the reload should occur on every change of CSS files, or (if it's possible) to somehow load the CSS changes into the running page (ala figwheel).

magnars commented 4 years ago

That is not in scope for Stasis. It’s just a collection of useful functions when building static web pages. Not a framework, no runtime, no websockets.

tir. 28. apr. 2020 kl. 16:18 skrev Vít Kalisz notifications@github.com:

I would like to have the behavior similar to figwheel, so every saved change in arbitrary namespace would automatically reload the content to match the current version and also the reload should occur on every change of CSS files, or (if it's possible) to somehow load the CSS changes into the running page (ala figwheel).

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/magnars/stasis/issues/28#issuecomment-620636561, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACA4OKS65DXWJFPXDKCHX3RO3QTFANCNFSM4MQXHKKQ .

vitkalisz commented 4 years ago

Very well. Of course. I thought that stasis should support development of static web without any reduction of the options the developer has. Stasis would be much stronger without the necessity to reload every time you make a change.

magnars commented 4 years ago

It doesn't reduce your options. It's just outside the scope of this project. Every library of tools can't bundle figwheel.