Skip to content

Commit

Permalink
fix reloaded workflow and cljx circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Kiva-Meyer committed Jun 12, 2014
1 parent e3738fb commit 75c93d6
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 34 deletions.
32 changes: 32 additions & 0 deletions dev/user.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
(ns user
(:require [clojure.tools.namespace.repl :refer [refresh]]
[com.stuartsierra.component :as component]
[omelette.main :as main]))

(def system nil)

(defn init []
(alter-var-root #'system (constantly (main/system 3000))))

(defn start []
(alter-var-root #'system component/start))

(defn stop []
(alter-var-root #'system #(when % (component/stop %))))

(defn go []
(init)
(start))

(defn reset []
(stop)
(refresh :after 'user/go))

(comment
(pr system)
(init)
(start)
(stop)
(go)
(reset)
(main/browse system))
14 changes: 8 additions & 6 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(defproject omelette "0.0.0"

:description "Example of mirrored server/client rendering and routing using Om, Sente, and the Nashorn JavaScript engine."
:description "Example of mirrored server/client rendering and routing using React/Om, Sente, and the Nashorn JavaScript engine."

:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"
Expand Down Expand Up @@ -28,12 +28,11 @@
[org.clojure/clojurescript "0.0-2227"]
[org.clojure/core.async "0.1.298.0-2a82a1-alpha"]
[org.clojure/core.match "0.2.1"]
[org.clojure/tools.namespace "0.2.4"]
[ring "1.3.0"]
[ring/ring-anti-forgery "0.3.2"]
[sablono "0.2.17"]]

:plugins [[com.keminglabs/cljx "0.3.2"]
:plugins [[com.keminglabs/cljx "0.4.0"]
[lein-cljsbuild "1.0.3"]
[lein-pdo "0.1.1"]]

Expand All @@ -48,12 +47,15 @@
:output-to "target/resources/public/assets/scripts/main.js"
:output-dir "target/resources/public/assets/scripts"
:source-map "target/resources/public/assets/scripts/main.js.map"
;; :source-map-path "assets/scripts/out"
:optimizations :whitespace}
:notify-command ["terminal-notifier" "-message"]}]}

:aliases {"build-once" ["do" "clean," "cljx" "once," "cljsbuild" "once"]
"build-auto" ["do" "clean"
:profiles {:dev {:dependencies [[org.clojure/tools.namespace "0.2.4"]]
:source-paths ["dev"]}
:build {}}

:aliases {"build-auto" ["with-profile" "build"
"do" "clean"
["cljx" "once"]
["pdo"
"cljx" "auto,"
Expand Down
28 changes: 0 additions & 28 deletions src/user.clj

This file was deleted.

0 comments on commit 75c93d6

Please sign in to comment.