aboutsummaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-08-15 23:23:37 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-08-15 23:23:37 +0100
commit3d4fc0e41c4416523843466ba13a08edc87e9af7 (patch)
tree33d5a70631bdff5571eab2036fc914cb069d7606 /dev
downloadTicTacToe-3d4fc0e41c4416523843466ba13a08edc87e9af7.tar.gz
TicTacToe-3d4fc0e41c4416523843466ba13a08edc87e9af7.zip
Cool lines are being drawn
Diffstat (limited to 'dev')
-rw-r--r--dev/user.clj42
1 files changed, 42 insertions, 0 deletions
diff --git a/dev/user.clj b/dev/user.clj
new file mode 100644
index 0000000..11a6018
--- /dev/null
+++ b/dev/user.clj
@@ -0,0 +1,42 @@
+(ns user
+ (:require
+ [figwheel-sidecar.repl-api :as f]))
+
+;; user is a namespace that the Clojure runtime looks for and
+;; loads if its available
+
+;; You can place helper functions in here. This is great for starting
+;; and stopping your webserver and other development services
+
+;; The definitions in here will be available if you run "lein repl" or launch a
+;; Clojure repl some other way
+
+;; You have to ensure that the libraries you :require are listed in your dependencies
+
+;; Once you start down this path
+;; you will probably want to look at
+;; tools.namespace https://github.com/clojure/tools.namespace
+;; and Component https://github.com/stuartsierra/component
+
+
+(defn fig-start
+ "This starts the figwheel server and watch based auto-compiler."
+ []
+ ;; this call will only work are long as your :cljsbuild and
+ ;; :figwheel configurations are at the top level of your project.clj
+ ;; and are not spread across different lein profiles
+
+ ;; otherwise you can pass a configuration into start-figwheel! manually
+ (f/start-figwheel!))
+
+(defn fig-stop
+ "Stop the figwheel server and watch based auto-compiler."
+ []
+ (f/stop-figwheel!))
+
+;; if you are in an nREPL environment you will need to make sure you
+;; have setup piggieback for this to work
+(defn cljs-repl
+ "Launch a ClojureScript REPL that is connected to your build and host environment."
+ []
+ (f/cljs-repl))