Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def reload-trigger-file "reload.trigger")
- (defn- touch-reload-trigger
- "Called on defn invocation; updates the mod time on the reload trigger
- file so LiveReload will reload the web page."
- []
- (with-open [w (io/writer (var-get #'reload-trigger-file))]
- (.write w "x")))
- (defn- trigger-on-defn [f & args]
- (touch-reload-trigger)
- (apply f args))
- (defn start-reloading-on-defn []
- (add-hook #'defn #'trigger-on-defn))
Add Comment
Please, Sign In to add comment