mirror of https://github.com/status-im/reagent.git
Update clojurescript, figwheel and cljsbuild.
Stop using :figwheel-always, that seems to be broken in the new figwheel.
This commit is contained in:
parent
10d54ea3e0
commit
767410d8d8
|
@ -1,4 +1,4 @@
|
|||
(ns ^:figwheel-always reagentdemo.core
|
||||
(ns reagentdemo.core
|
||||
(:require [reagent.core :as reagent :refer [atom]]
|
||||
[reagent.interop :as i :refer-macros [.' .!]]
|
||||
[clojure.string :as string]
|
||||
|
@ -39,6 +39,9 @@
|
|||
[tools/page-content]
|
||||
[github-badge]])
|
||||
|
||||
(tools/start! {:body [#'demo]
|
||||
:css-infiles ["site/public/css/examples.css"
|
||||
"site/public/css/main.css"]})
|
||||
(defn init! []
|
||||
(tools/start! {:body [#'demo]
|
||||
:css-infiles ["site/public/css/examples.css"
|
||||
"site/public/css/main.css"]}))
|
||||
|
||||
(init!)
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
(ns reagentdemo.dev
|
||||
(:require [reagentdemo.core]
|
||||
[reagenttest.runtests]
|
||||
(: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
|
||||
{:websocket-url "ws://localhost:3449/figwheel-ws"}))
|
||||
{:on-jsload reload
|
||||
:websocket-url "ws://localhost:3449/figwheel-ws"}))
|
||||
|
|
11
project.clj
11
project.clj
|
@ -4,10 +4,10 @@
|
|||
:description "A simple ClojureScript interface to React"
|
||||
|
||||
:dependencies [[org.clojure/clojure "1.6.0"]
|
||||
[org.clojure/clojurescript "0.0-2816"]
|
||||
[org.clojure/clojurescript "0.0-3126"]
|
||||
[cljsjs/react "0.12.2-5"]]
|
||||
|
||||
:plugins [[lein-cljsbuild "1.0.4"]]
|
||||
:plugins [[lein-cljsbuild "1.0.5"]]
|
||||
|
||||
:source-paths ["src"]
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
|||
{:builds {:client {:source-paths ["test"]}}}}
|
||||
|
||||
:dev [:test
|
||||
{:dependencies [[figwheel "0.2.3-SNAPSHOT"]]
|
||||
:plugins [[lein-figwheel "0.2.3-SNAPSHOT"]]
|
||||
{:dependencies [[figwheel "0.2.5"]]
|
||||
:plugins [[lein-figwheel "0.2.5"]]
|
||||
:source-paths ["demo"] ;; for lighttable
|
||||
:resource-paths ["site" "outsite"]
|
||||
:figwheel {:css-dirs ["site/public/css"]}
|
||||
|
@ -69,4 +69,5 @@
|
|||
:compiler {:output-to "outsite/public/js/main.js"}}}}
|
||||
|
||||
:figwheel {:http-server-root "public" ;; assumes "resources"
|
||||
:repl false})
|
||||
;; broken in figwheel 0.2.5: :repl false
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
(ns ^:figwheel-always reagenttest.runtests
|
||||
(ns reagenttest.runtests
|
||||
(:require [reagenttest.testreagent]
|
||||
[reagenttest.testcursor]
|
||||
[reagenttest.testinterop]
|
||||
|
@ -44,7 +44,10 @@
|
|||
(js/setTimeout all-tests 100)
|
||||
(all-tests)))
|
||||
|
||||
(when (some? (test/deftest empty-test))
|
||||
;; Only run with :load-tests true
|
||||
(reset! demo/test-results [#'test-output-mini])
|
||||
(run-tests))
|
||||
(defn init! []
|
||||
(when (some? (test/deftest empty-test))
|
||||
;; Only run with :load-tests true
|
||||
(reset! demo/test-results [#'test-output-mini])
|
||||
(run-tests)))
|
||||
|
||||
(init!)
|
||||
|
|
Loading…
Reference in New Issue