-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to figwheel-main, headless chrome, fix js mistakes
- Loading branch information
Showing
13 changed files
with
120 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
((nil | ||
(cider-preferred-build-tool . "lein") | ||
(cider-default-cljs-repl . figwheel-main) | ||
(cider-figwheel-main-default-options . "dev"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<h1>Test host page</h1> | ||
<script src="cljs-out/test-main.js" type="text/javascript"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
^{:watch-dirs ["test" "src"] | ||
:open-url false | ||
:auto-testing true} | ||
{:main "re-graph.core" | ||
:output-to "target/public/re-graph.js" | ||
:preloads [devtools.preload] | ||
:external-config {:devtools/config {:features-to-install [:formatters :hints] | ||
:fn-symbol "F" | ||
:print-config-overrides true}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
;; borrowed from https://gist.github.com/caskolkm/39d823f5bac7051d3062 | ||
(ns re-graph.logging | ||
(:refer-clojure :exclude [time]) | ||
(:require #?(:clj [clojure.tools.logging :as log] | ||
:cljs [goog.log :as glog])) | ||
#?(:cljs (:import goog.debug.Console))) | ||
|
||
#?(:cljs | ||
(def logger | ||
(glog/getLogger "app"))) | ||
|
||
#?(:cljs | ||
(def levels {:severe goog.debug.Logger.Level.SEVERE | ||
:warning goog.debug.Logger.Level.WARNING | ||
:info goog.debug.Logger.Level.INFO | ||
:config goog.debug.Logger.Level.CONFIG | ||
:fine goog.debug.Logger.Level.FINE | ||
:finer goog.debug.Logger.Level.FINER | ||
:finest goog.debug.Logger.Level.FINEST})) | ||
|
||
#?(:cljs | ||
(defn log-to-console! [] | ||
(.setCapturing (goog.debug.Console.) true))) | ||
|
||
#?(:cljs | ||
(defn set-level! [level] | ||
(.setLevel logger (get levels level (:info levels))))) | ||
|
||
(defn fmt [msgs] | ||
(apply str (interpose " " (map pr-str msgs)))) | ||
|
||
(defn info [& s] | ||
(let [msg (fmt s)] | ||
#?(:clj (log/info msg) | ||
:cljs (glog/info logger msg)))) | ||
|
||
(defn debug [& s] | ||
(let [msg (fmt s)] | ||
#?(:clj (log/debug msg) | ||
:cljs (glog/fine logger msg)))) | ||
|
||
(defn warn [& s] | ||
(let [msg (fmt s)] | ||
#?(:clj (log/warn msg) | ||
:cljs (glog/warning logger msg)))) | ||
|
||
(defn error [& s] | ||
(let [msg (fmt s)] | ||
#?(:clj (log/error msg) | ||
:cljs (glog/error logger msg)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
^{ | ||
;; use an alternative landing page for the tests so that we don't | ||
;; launch the application | ||
:open-url "http://[[server-hostname]]:[[server-port]]/test.html" | ||
:launch-js ["/opt/google/chrome/google-chrome" "--headless" "--disable-gpu" "--remote-debugging-port=9222" "--no-sandbox" :open-url]} | ||
{:main re-graph.test-runner} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
;; This test runner is intended to be run from the command line | ||
(ns re-graph.test-runner | ||
(:require | ||
[re-graph.all-tests] | ||
[figwheel.main.testing :refer [run-tests-async]])) | ||
|
||
(defn -main [& args] | ||
(run-tests-async 5000)) |