-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Feature request : Hot Reload / Live Reload #354
Comments
Not sure why you would not do it in your code with (reload (location body))
or at a REPL (just set a global to current window while testing)?
…On Sun, May 26, 2024 at 10:27 AM 0fflineuser ***@***.***> wrote:
Hi,
I think they would be great for when developping, as it would eliminate
the need to manually refresh the web page and allowing us to instantly see
changes in the browser.
Examples :
- Flutter Hot Reload <https://www.youtube.com/watch?v=sgPQklGe2K8>
- Live Reload <https://www.youtube.com/watch?v=QQ3J59AKZLU>
—
Reply to this email directly, view it on GitHub
<#354>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUEFLE5DI4WLRFN3QFI5DZEHWMNAVCNFSM6AAAAABIJ3DV7CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTONZTHE2TGMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
If you mean individual elements. same exact thing - just do it. CLOG is
always live. Maybe give me example as you may not have made the leap to a
CLOG brain yet :)
CLOG is the original hot load :)
(setf *t* (create-div body :content "hello")
(setf (text-value *t*) "Hello World!")
…On Sun, May 26, 2024 at 10:37 AM David Botton ***@***.***> wrote:
Not sure why you would not do it in your code with (reload (location
body)) or at a REPL (just set a global to current window while testing)?
On Sun, May 26, 2024 at 10:27 AM 0fflineuser ***@***.***>
wrote:
> Hi,
>
> I think they would be great for when developping, as it would eliminate
> the need to manually refresh the web page and allowing us to instantly see
> changes in the browser.
>
> Examples :
>
> - Flutter Hot Reload <https://www.youtube.com/watch?v=sgPQklGe2K8>
> - Live Reload <https://www.youtube.com/watch?v=QQ3J59AKZLU>
>
> —
> Reply to this email directly, view it on GitHub
> <#354>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACYUEFLE5DI4WLRFN3QFI5DZEHWMNAVCNFSM6AAAAABIJ3DV7CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTONZTHE2TGMI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Thanks a lot ! So for the live reload I did the following : (defun dev-live-reload ()
(progn
(if (not (boundp '*CURRENT-WINDOW*))
(defparameter *CURRENT-WINDOW* nil))
(if (and *CURRENT-WINDOW* (equal (type-of *CURRENT-WINDOW*) 'clog-location))
(reload *CURRENT-WINDOW*))))
(defun on-index (body)
(setf *CURRENT-WINDOW* (location body))
;; ....
)
(defun start-app ()
(initialize 'on-index)
(open-browser))
;; reload the page
(dev-live-reload) Now I just do my changes, reload the file and the browser also reload itself ! |
In most cases you probably don't need to ever reload as you are writing an
App not a web page :) You will see :) That is part of the CL power you are
having a conversation with it, not writing a program.
…On Sun, May 26, 2024 at 11:22 AM 0fflineuser ***@***.***> wrote:
Thanks a lot !
I am new to common lisp and clog. I see that reload is in the manual and
used in the tutorial 14, sry I missed it.
So for the live reload I did the following :
(defun dev-live-reload ()
(progn
(if (not (boundp '*CURRENT-WINDOW*))
(defparameter *CURRENT-WINDOW* nil))
(if (and *CURRENT-WINDOW* (equal (type-of *CURRENT-WINDOW*) 'clog-location))
(reload *CURRENT-WINDOW*))))
(defun on-index (body)
(setf *CURRENT-WINDOW* (location body))
;; ....
)
(defun start-app ()
(initialize 'on-index)
(open-browser))
;; reload the page
(dev-live-reload)
Now I just do my changes, reload the file and the browser also reload
itself !
—
Reply to this email directly, view it on GitHub
<#354 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUEFOW7AZ3OKWOXP6WUDTZEH42XAVCNFSM6AAAAABIJ3DV7CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGI2TONZSGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Also, if you use Emacs or lem, you can just bind a key binding to call something like:
Here is my Lem binding: https://github.com/aykaramba/edgar/blob/main/commands.lisp I load that up in my EDGAR project, it is Lem specific. I need to write one for Emacs as well. When I am coding in C-c all the time and when I want to see my changes updated in the browser I just C-v whenever I want. |
Hi,
I think they would be great for when developping, as it would eliminate the need to manually refresh the web page and allowing us to instantly see changes in the browser.
Examples :
The text was updated successfully, but these errors were encountered: