Skip to content

Commit

Permalink
clarifying file loading messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruce Hauman committed Dec 16, 2014
1 parent 3589f7a commit fed0f0c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
16 changes: 4 additions & 12 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@

* make sure plugin tests pass

* look at cljs.test plugin for client
* ### look at repl integration
* add basic autobuilding loop to clojurescript-build

* add assert?

* look at cljs.test plugin for client

* multiple builds?

* ### look at repl integration

* clean up parameter passing
* look at subproject leiningen cljsbuild code and see whats needed

* dynamic env for figwheel.core
* create seperate feature testing projects
* reset from client - mark all files for deletion
* reset and reload form client

* look at sending incremental changes th the browser and the interaction with source maps

* html change causes refresh
* clean from browser is a big win
##### completed
* resource paths? better way to handle it eh?
* shouldn't reload everything on clj file changes now
Expand Down
3 changes: 2 additions & 1 deletion support/src/figwheel/client.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@
(.warn js/console "Figwheel: Compile Warning -" message)
w)


(defn default-before-load [files]
(.debug js/console "Figwheel: loading files")
(.debug js/console "Figwheel: notified of file changes")
files)

(defn default-on-cssload [files]
Expand Down
11 changes: 8 additions & 3 deletions support/src/figwheel/client/file_reloading.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,17 @@
(defn reload-js-files [{:keys [before-jsload on-jsload] :as opts} {:keys [files] :as msg}]
(go
(before-jsload files)
(let [files' (add-request-urls opts files)
res (filter :loaded-file (<! (load-all-js-files files')))]
(let [files' (add-request-urls opts files)
res' (<! (load-all-js-files files'))
res (filter :loaded-file res')
files-not-loaded (filter #(not (:loaded-file %)) res')]
(when (not-empty res)
(.debug js/console "Figwheel: loaded these files")
(.log js/console (pr-str (map :file res)))
(js/setTimeout #(apply on-jsload [res]) 10)))))
(js/setTimeout #(apply on-jsload [res]) 10))
(when (not-empty files-not-loaded)
(.debug js/console "Figwheel: NOT loading files that haven't been required")
(.log js/console (pr-str (map :file files-not-loaded)))))))

;; CSS reloading

Expand Down

0 comments on commit fed0f0c

Please sign in to comment.