Take advantage of new figwheel

This commit is contained in:
Dan Holmsand 2015-05-31 11:51:11 +02:00
parent 05bb63f254
commit 569322949b
5 changed files with 14 additions and 22 deletions

View File

@ -1,14 +0,0 @@
(ns reagentdemo.dev
(:require [reagentdemo.core :as demo]
[reagenttest.runtests :as tests]
[reagent.core :as r]
[figwheel.client :as fw]))
(defn reload []
(demo/init!)
(tests/init!))
(when r/is-client
(fw/start
{:on-jsload reload
:websocket-url "ws://localhost:3449/figwheel-ws"}))

View File

@ -23,8 +23,9 @@
:cljsbuild
{:builds
{:client
{:source-paths ["env/dev"]
:compiler {:main "reagentdemo.dev"
{;;:source-paths ["env/dev"]
:figwheel {:on-jsload "reagenttest.runtests/reload"}
:compiler {:main "reagenttest.runtests"
:source-map true
:source-map-timestamp true
:optimizations :none
@ -69,5 +70,4 @@
:compiler {:output-to "outsite/public/js/main.js"}}}}
:figwheel {:http-server-root "public" ;; assumes "resources"
:repl false
})
:repl false})

View File

@ -1,4 +1,5 @@
(ns reagent.ratom)
(ns reagent.ratom
(:refer-clojure :exclude [run!]))
(defmacro reaction [& body]
`(reagent.ratom/make-reaction

View File

@ -1,7 +1,8 @@
(ns reagent.ratom
(:refer-clojure :exclude [atom run!])
(:require-macros [reagent.debug :refer (dbg log warn dev?)])
(:require [reagent.impl.util :as util]))
(:refer-clojure :exclude [atom])
(:require-macros [reagent.ratom])
(:require [reagent.impl.util :as util]
[reagent.debug :refer-macros [dbg log warn dev?]]))
(declare ^:dynamic *ratom-context*)

View File

@ -50,4 +50,8 @@
(reset! demo/test-results [#'test-output-mini])
(run-tests)))
(defn reload []
(demo/init!)
(init!))
(init!)