This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-09
Channels
- # announcements (5)
- # babashka (1)
- # beginners (116)
- # calva (139)
- # cider (11)
- # clara (2)
- # clj-kondo (13)
- # clojure (247)
- # clojure-dev (18)
- # clojure-europe (5)
- # clojure-france (2)
- # clojure-italy (2)
- # clojure-nl (7)
- # clojure-spec (24)
- # clojure-uk (34)
- # clojurescript (41)
- # cursive (11)
- # data-science (2)
- # datomic (33)
- # emacs (10)
- # events (3)
- # fulcro (134)
- # graphql (9)
- # jackdaw (3)
- # jobs (1)
- # joker (20)
- # kaocha (3)
- # leiningen (7)
- # luminus (2)
- # malli (3)
- # music (1)
- # pedestal (7)
- # re-frame (25)
- # remote-jobs (7)
- # ring (7)
- # shadow-cljs (85)
- # spacemacs (13)
- # testing (2)
- # tools-deps (60)
- # xtdb (11)
- # yada (7)
Hi, I have a quick question regarding cljs compiling. When adding :compiler-stats to a figwheel-main project, it shows compilation time twice like
Compile sources, elapsed time: 4815.209582 msecs
Compile sources, elapsed time: 1016.908942 msecs
Any idea what’s the difference between the two? Thanks Yes, looks good
@nicholas.jaunsen typically you’ll want to have your dev tooling set up so that it will call mountit
on reload
and in your index.html, after the js has loaded you would call coding_test.website.core.mountit()
When I run lein cljsbuild once min
it seems to be picking up the dependencies from my dev
profile... is this correct behaviour or am I having a misconfigured project?
so does that mean that in a full-stack project, all the cljsjs
dependencies can be moved into dev profile?
will it work if I have cljsbuild as prep task to uberjar?
thanks
https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md#default-profiles > he :default profile specifies the profiles that are active by default when running lein tasks. If not overridden, this is set to :leiningen/default, which is a composite profile with [:base :system :user :provided :dev]
hm but when I uberjar it uses a different set of profiles? So running cljsbuild once min
might be picking up my dev dependencies and it works even if I move all my cljs deps into dev profile, but when uberjaring it won't do the same if my uberjar profile has : :prep-tasks ["compile" ["cljsbuild" "once" "min"]]
and it will fail?
Does anyone know how to properly extend native es6 classes from clojurescript?
Do you mean subclassing?
requires more dirty hacks when extending "native" classes though (eg. class Thing extends HTMLElement
)
wonder how hard it would be to create a macro that emits an actual class declaration
@U05224H0W thanks I looked at that before which seems similar to https://github.com/bodil/pylon
I get this however TypeError: Class constructor OAuthStrategy cannot be invoked without 'new'
I thought there might be a better way tho
I think this is because you’re importing the actual ES6 code instead of the transpiled ES5
right, im using an npm dependency on nodejs (simple compilation) via shadow-cljs
feathersjs/grant-js
i’m not easily finding the source for that. but I would see if you can import an ES5-compatible version
they compile to es2015
Hi guys, cljs noob here. I'm using shadow-cljs for a new client+server app, and am thoroughly enjoying shadow-cljs watch client server
for hot reloading. Only trouble is, part of the client is an index.html
file (which lies in the client
src dir), and I haven't figured out how to get shadow-cljs watch
to react to changes to it. Changes to my other .cljs
source files trigger the watch/reloading just fine.