This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-22
Channels
- # beginners (17)
- # cider (3)
- # cljsrn (18)
- # clojure (76)
- # clojure-france (1)
- # clojure-italy (4)
- # clojure-nl (3)
- # clojure-poland (1)
- # clojure-uk (5)
- # clojurescript (33)
- # core-async (10)
- # datomic (31)
- # duct (5)
- # emacs (4)
- # fulcro (1)
- # graphql (5)
- # keechma (3)
- # off-topic (36)
- # onyx (1)
- # re-frame (4)
- # reagent (9)
- # reitit (9)
- # shadow-cljs (11)
- # vim (2)
onlyIn
doesn't appear in externs.shadow.js
anymore, and the generated code is mangled incorrectly, as before
Hi guys, I am using https://github.com/jgdavey/boot-shadow-cljs to compile cljs in a boot task. The compilation is fine and the files are written but they are not being picked up by server. To expand, I am using a ring server with site-defaults which is able to serve other resources but not the js files generated in the task.| The build config https://github.com/jgdavey/boot-shadow-cljs/blob/master/src/com/joshuadavey/boot_shadow_cljs.clj#L88 produced in the task is
{:target :browser, :output-dir /home/akash/.boot/cache/tmp/home/akash/workspace/voidwalker/gw3/-fmvxaj/resources/public/js, :asset-path /js, :compiler-options {:optimizations :simple}, :modules {:app {:entries [voidwalker.source.app]}}, :id :app, :build-id :app, :cache-root /home/akash/.boot/cache/cache/project/home/akash/workspace/voidwalker/com.joshuadavey.boot-shadow-cljs/cache}
When accessing the file.. I get response map is nil.
My shadow-cljs.edn
{:source-paths ["src/cljs"]
:nrepl {:port 55000}
:http {:port 9070
:host "0.0.0.0"}
:dependencies [[reagent "0.8.0-alpha2"]
[reagi "0.10.1"]
[funcool/bide "1.6.0"]
[cljs-ajax "0.6.0"]
[proto-repl "0.3.1"]
[day8.re-frame/http-fx "0.1.3"]
[hickory "0.7.1"]
[re-frame "0.10.5"]
[cider/cider-nrepl "0.17.0-SNAPSHOT"]
[refactor-nrepl "2.4.0-SNAPSHOT"]]
:builds {:app {:target :browser
:output-dir "resources/public/js"
:asset-path "/js"
:compiler-options {:optimizations :simple}
:modules
{:app
{:entries [voidwalker.source.app]}}}}}
What should I look into?Got it ... the fix was to set output-dir to public/js
since that is what is served. :man-facepalming:
When hot-reloading a namespace with shadow-cljs, vars which have been removed from the code remain defined (similar to sending the whole thing to the REPL). When hot-reloading with figwheel they are removed. Can I get that behaviour with shadow-cljs?
For example if I have a test defined in a namespace with deftest and remove or rename it, the old version's still there and gets executed with (run-tests).
this should be fixed as of [email protected]