Use grub.js if production arg is given
This commit is contained in:
parent
1f9108b96a
commit
f19a0b022b
1 changed files with 8 additions and 4 deletions
|
@ -11,6 +11,8 @@
|
||||||
[page :refer [html5]]
|
[page :refer [html5]]
|
||||||
[page :refer [include-js include-css]]]))
|
[page :refer [include-js include-css]]]))
|
||||||
|
|
||||||
|
(def js-file (atom "/js/grub_dev.js"))
|
||||||
|
|
||||||
(defn index-page []
|
(defn index-page []
|
||||||
(html5
|
(html5
|
||||||
[:head
|
[:head
|
||||||
|
@ -21,7 +23,7 @@
|
||||||
[:body
|
[:body
|
||||||
(include-js "http://code.jquery.com/jquery.js")
|
(include-js "http://code.jquery.com/jquery.js")
|
||||||
(include-js "/js/bootstrap.js")
|
(include-js "/js/bootstrap.js")
|
||||||
(include-js "/js/grub_dev.js")]))
|
(include-js @js-file)]))
|
||||||
|
|
||||||
(defroutes routes
|
(defroutes routes
|
||||||
(GET "/ws" [] ws/websocket-handler)
|
(GET "/ws" [] ws/websocket-handler)
|
||||||
|
@ -48,6 +50,8 @@
|
||||||
(stop-server)))
|
(stop-server)))
|
||||||
|
|
||||||
(defn -main [& args]
|
(defn -main [& args]
|
||||||
(if (some #(= % "integration") args)
|
(cond
|
||||||
(run-integration-test)
|
(some #(= % "integration") args) (run-integration-test)
|
||||||
(start-server default-port)))
|
(some #(= % "production") args) (do (reset! js-file "/js/grub.js")
|
||||||
|
(start-server default-port))
|
||||||
|
:else (start-server default-port)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue