Commit 3320590 1 parent 25e12a0 commit 3320590 Copy full SHA for 3320590
File tree 1 file changed +11
-9
lines changed
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,19 @@ Accepts the following options:
39
39
:restart-fn \" the function to restart the system\" if none 'user/start-dev-system
40
40
:tracker {:dirs \" the directories vector list to search for changes\" :reload-compile-errors? \" true\" }."
41
41
[cfg]
42
- (let [{:keys [restart-fn tracker]} (:xiana/hotreload cfg { :restart-fn 'user/start-dev-system} )
42
+ (let [{:keys [restart-fn tracker]} (:xiana/hotreload cfg)
43
43
dirs (:dirs tracker [" src" ])
44
44
retry? (:reload-compile-errors? tracker true )
45
45
track-fn (ns-tracker dirs)
46
46
reload! (reloader dirs retry?)
47
- restart-fn (resolve restart-fn)]
48
- (go-loop []
49
- (<! (timeout 1000 ))
50
- (if (track-fn )
51
- (do
52
- (reload! )
53
- (restart-fn ))
54
- (recur )))
47
+ restart-fn (when restart-fn (resolve restart-fn))]
48
+ (when restart-fn
49
+ (go-loop []
50
+ (<! (timeout 1000 ))
51
+ (println " hotreload!" )
52
+ (if (track-fn )
53
+ (do
54
+ (reload! )
55
+ (restart-fn ))
56
+ (recur ))))
55
57
cfg))
You can’t perform that action at this time.
0 commit comments