Giter Site home page Giter Site logo

Comments (5)

rabbibotton avatar rabbibotton commented on June 24, 2024

from clog.

rabbibotton avatar rabbibotton commented on June 24, 2024

from clog.

0fflineuser avatar 0fflineuser commented on June 24, 2024

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 !

from clog.

rabbibotton avatar rabbibotton commented on June 24, 2024

from clog.

aykaramba avatar aykaramba commented on June 24, 2024

Also, if you use Emacs or lem, you can just bind a key binding to call something like:

  (defun reload (obj)
    (url-replace (location body) "/"))

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.

from clog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.