Sitelet https://github.com/clojurephant/clojurephant/commit/2ec379bc625a1fd7d5c5d948449947e2b6c15792
Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit 2ec379b

Browse files
committed
Update manual test to use tooling API
1 parent 83260c9 commit 2ec379b

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

‎manual-test/build.gradle‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ dependencies {
3636
implementation 'com.stuartsierra:component:1.1.0'
3737
devImplementation 'com.stuartsierra:component.repl:0.2.0'
3838

39-
// figwheel
40-
devImplementation 'com.bhauman:figwheel-repl:0.2.18'
41-
devImplementation 'ring:ring-jetty-adapter:1.9.5'
39+
// clojurescript repl
40+
devImplementation('dev.clojurephant:clojurephant-tooling:0.1.0-alpha.5') {
41+
capabilities {
42+
requireCapabilities('dev.clojurephant:clojurephant-tooling-figwheel-main')
43+
}
44+
}
4245
}
4346

4447
tasks.withType(Test) {
@@ -74,7 +77,10 @@ clojurescript {
7477
compiler {
7578
optimizations = 'none'
7679
sourceMap = true
77-
preloads = ['sample.dev']
80+
// preloads = ['sample.dev']
81+
}
82+
figwheel {
83+
openUrl = "http://localhost:8080/index.html"
7884
}
7985
}
8086
}

‎manual-test/settings.gradle‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
rootProject.name = 'clojurephant-manual-test'
22

33
includeBuild('..')
4+
includeBuild('../../clojurephant-tooling')

‎manual-test/src/main/clojurescript/sample/main.cljs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(ns sample.main
1+
(ns ^:figwheel-hooks sample.main
22
(:require [reagent.core :as reagent]
33
[reagent.dom :as rdom]
44
[re-frame.core :as rf]))
@@ -19,7 +19,7 @@
1919
:initialize
2020
(fn [_ _]
2121
{:time (js/Date.)
22-
:time-color "Orange"}))
22+
:time-color "Green"}))
2323

2424
(rf/reg-event-db
2525
:time-color-change
@@ -60,7 +60,7 @@
6060
[clock]
6161
[color-input]])
6262

63-
(defn mount-ui []
63+
(defn ^:after-load mount-ui []
6464
(rdom/render [ui] (js/document.getElementById "app")))
6565

6666
(defn run []

0 commit comments

Comments
 (0)