Liking cljdoc? Tell your friends :D

watch.core

clj

Allos you to (mainly) reload your namespaces in an simple way or do other things when your files are modified.

Allos you to (mainly) reload your namespaces in an simple way or do other
things when your files are modified.
cljs

Allos you to (mainly) reload your namespaces in an simple way or do other things when your files are modified. It is intended for clojurecript repl over nodejs or lumo.

Allos you to (mainly) reload your namespaces in an simple way or do other
things when your files are modified. It is intended for clojurecript repl
over nodejs or lumo.
raw docstring

enough-millisclj/s

source (clj)source (cljs)

fscljs

source

reloadclj/s≠macro

clj
(reload rou file & actions)
cljs
(reload &form &env rou file & actions)

Reload a namespace every time a file is modified. It can also dispatch multiple actions. The macro returns the watch descriptor alone. If the reloading fails the actions are not executed.

Ej. (def b (reload (require '[clojure.string :as st]) "t.clj" (println "hola") (println "adios")))

Reload a namespace every time a file is modified. It can also dispatch
 multiple actions. The macro returns the watch descriptor alone.
 If the reloading fails the actions are not executed.

Ej.
(def b
   (reload (require '[clojure.string :as st])
           "t.clj" (println "hola") (println "adios")))
source (clj)source (cljs)raw docstring

stopclj/s

(stop f)

Stop a watch using the watch descriptor or using a hashmap of descriptors (gotten from watch fn) and the file name to stop watching.

Stop a watch using the watch descriptor or using
a hashmap of descriptors (gotten from watch fn) and
the file name to stop watching.
source (clj)source (cljs)raw docstring

stop-allclj/s

(stop-all)

Stop all watching from a hashmap of descriptors.

Stop all watching from a hashmap of descriptors.
source (clj)source (cljs)raw docstring

waiting-millisclj/s

source (clj)source (cljs)

watchclj/s

(watch f hn)

Observes a file and executes a handler. Receives a hashmap to associate the watch descriptor using the filename as key. The handler function receives the ctx and the event descriptor. The handler are dispatched ONLY when the file is modified. You can only define a watch per file, as the watch descriptor is associated in the hm by key. If you need to associate many watches to a file, it is better to use hawk directly.

Ej. (watch "test.clj" (fn wtestwt [ctx e] nil))

Observes a file  and executes a handler.
Receives a hashmap to associate the watch descriptor using the
filename as key.
The handler function receives the ctx and the event descriptor.
The handler are dispatched ONLY when the file is modified.
You can only define a watch per file, as the watch descriptor is
associated in the hm by key. If you need to associate many watches
to a file, it is better to use hawk directly.

Ej.
(watch "test.clj" (fn wtestwt [ctx e] nil))
source (clj)source (cljs)raw docstring

watch-debugclj

(watch-debug f)

Observes all events from file name and print it on the console. Return the watch descriptor.

Observes all events from file name and print it on the console.
Return the watch descriptor.
sourceraw docstring

watch-entryclj/s

(watch-entry f watcher)
source (clj)source (cljs)

watchedclj/s

(watched)

Return the watched file names from the user hashmap.

Return the watched file names from the user hashmap.
source (clj)source (cljs)raw docstring

watched-filesclj/s

Descriptors.

Descriptors.
source (clj)source (cljs)raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close