Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate binaryage/devtools for CLJS debugging #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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