Skip to content

Commit

Permalink
Integrate binaryage/devtools for CLJS debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouni Honkala authored and Jouni Honkala committed Nov 14, 2017
1 parent 08aee6d commit 77fd034
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Kun figwheel on käynnissä frontend buildi päivittyy automaattisesti ja kytkey
koodimuutokset. Joissain tapauksissa täytyy selain uudelleenladata, jos React jää virheelliseen
tilaan, mutta useimmat muutokset toimivat livenä.

Käytössä on myös Chrome-selaimessa toimiva konsolilaajennus:

https://github.com/binaryage/cljs-devtools

# Backend kehitys

Kun kehität backendiä, aja `lein run` komennon sijasta `lein repl` ja kytkeydy siihen lempieditorillasi.
Expand Down
5 changes: 3 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
;; Something pulls an old guava which prevents closure compiler
;; override here
[com.google.guava/guava "21.0"]
]
[binaryage/devtools "0.9.7"]]

:plugins [[lein-cljsbuild "1.1.5"]
[lein-figwheel "0.5.10"]]
Expand All @@ -56,6 +56,7 @@
:compiler {:optimizations :none
:source-map true
:output-to "resources/public/js/widgetshop.js"
:output-dir "resources/public/js/out"}}]}
:output-dir "resources/public/js/out"
:preloads [devtools.preload]}}]}

:main widgetshop.main)
2 changes: 1 addition & 1 deletion resources/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

<script src="js/out/goog/base.js" type="text/javascript"></script>
<script src="js/widgetshop.js" type="text/javascript"></script>
<script type="text/javascript">goog.require("widgetshop.main");</script>
<script type="text/javascript">goog.require("devtools.preload"); goog.require("widgetshop.main");</script>
</body>
</html>
1 change: 1 addition & 0 deletions src/cljs/widgetshop/server.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"Server communication"
(:require [ajax.core :as ajax]))


(defn get! [url {:keys [params on-success on-failure]}]
(ajax/GET url {:params params
:handler on-success
Expand Down

0 comments on commit 77fd034

Please sign in to comment.