2015-10-20 01:33:56 +00:00
|
|
|
(ns dev
|
|
|
|
|
"Tools for interactive development with the REPL. This file should
|
|
|
|
|
not be included in a production build of the application."
|
|
|
|
|
;; (:use [cljs.repl :only [repl]]
|
|
|
|
|
;; [cljs.repl.browser :only [repl-env]])
|
|
|
|
|
(:require [clojure.java.io :as io]
|
|
|
|
|
[clojure.java.javadoc :refer [javadoc]]
|
|
|
|
|
[clojure.pprint :refer [pprint]]
|
|
|
|
|
[clojure.reflect :refer [reflect]]
|
|
|
|
|
[clojure.repl :refer [apropos dir doc find-doc pst source]]
|
|
|
|
|
[clojure.set :as set]
|
|
|
|
|
[clojure.string :as str]
|
|
|
|
|
[clojure.test :as test]
|
|
|
|
|
;; [clojure.core.async :refer [>!! <!! >! <! go-loop alt! timeout]]
|
2015-10-21 11:32:51 +00:00
|
|
|
[clojure.tools.namespace.repl :as tn]
|
2015-11-15 19:40:34 +00:00
|
|
|
[check.parts-test]
|
2015-11-16 03:28:34 +00:00
|
|
|
[check.start-with-test]
|
2015-11-21 16:23:24 +00:00
|
|
|
[check.suspend-resume-test]
|
2015-11-17 05:09:45 +00:00
|
|
|
[mount.core :as mount]
|
2015-10-26 02:08:37 +00:00
|
|
|
[app :refer [create-nyse-schema find-orders add-order]])) ;; <<<< replace this your "app" namespace(s) you want to be available at REPL time
|
2015-10-20 01:33:56 +00:00
|
|
|
|
|
|
|
|
(defn start []
|
2015-11-16 03:28:34 +00:00
|
|
|
(mount/start-without #'check.start-with-test/test-conn
|
|
|
|
|
#'check.start-with-test/test-nrepl
|
2015-11-21 16:23:24 +00:00
|
|
|
#'check.parts-test/should-not-start
|
|
|
|
|
#'check.suspend-resume-test/web-server
|
|
|
|
|
#'check.suspend-resume-test/q-listener)) ;; example on how to start app without certain states
|
2015-10-20 01:33:56 +00:00
|
|
|
|
|
|
|
|
(defn stop []
|
2015-10-26 02:27:09 +00:00
|
|
|
(mount/stop))
|
2015-10-20 01:33:56 +00:00
|
|
|
|
2015-10-21 11:32:51 +00:00
|
|
|
(defn refresh []
|
|
|
|
|
(stop)
|
|
|
|
|
(tn/refresh))
|
|
|
|
|
|
|
|
|
|
(defn refresh-all []
|
|
|
|
|
(stop)
|
|
|
|
|
(tn/refresh-all))
|
|
|
|
|
|
2015-10-20 01:33:56 +00:00
|
|
|
(defn go
|
2015-10-25 18:41:24 +00:00
|
|
|
"starts all states defined by defstate"
|
2015-10-20 01:33:56 +00:00
|
|
|
[]
|
2015-10-20 14:26:35 +00:00
|
|
|
(start)
|
2015-10-20 01:33:56 +00:00
|
|
|
:ready)
|
|
|
|
|
|
|
|
|
|
(defn reset
|
2015-10-25 18:41:24 +00:00
|
|
|
"stops all states defined by defstate, reloads modified source files, and restarts the states"
|
2015-10-20 01:33:56 +00:00
|
|
|
[]
|
|
|
|
|
(stop)
|
2015-10-21 11:32:51 +00:00
|
|
|
(tn/refresh :after 'dev/go))
|