Hi, I am porting an old app created at the end of 2015. It was my first app in clojurescript, and since then in production. So from lighttable, leiningen, closure library I would like to migrate to calva, shadow-cljs, newer closure library. So far I am able to compile the code, and clj-kondo revealed some very fishy spots. But application works in simple mode. So now I would like to eliminate compilation warnings I am including google maps in my html page (<script src="https://maps.googleapis.com/maps/api/js?key=AIza.....&libraries=drawing"></script>
34 | (when bslayer
35 | (google.maps.event/addListener
----------^---------------------------------------------------------------------
No such namespace: google.maps.event, could not locate google/maps/event.cljs, google/maps/event.cljc, or JavaScript source providing "google.maps.event"
my build:
{:frontend
{:target :browser
:compiler-options {:externs ["google_maps_api_v3_19.js"]}
; google_maps_api_v3_19.js is in the same dir as shadow-cljs.edn
@jj974 use js/google.maps.events.addListener
if you use google.maps.event/addListener
it expects that to be a CLJS namespace
Thanks, I was looking (reading about) npm stuff. this is much better.
:node-test
❤️
In Cursive, I'm happily using a Remote Repl with Shadow. I normally run npx shadow-cljs watch app
from the terminal, however. Any good hints on how to integrate this part of the workflow better into Intellij?
Cursive does have a built-in terminal? 😛
Hi guys!
I'm connected to a CLJS Repl (running on the browser), with Shadow 2.11.13
and CLJS 1.10.773
and I keep getting this error when trying to eval my dev
namesapce:
Execution error (ReferenceError) at (<cljs repl>:1).
dev is not defined
This also happens when I run part of it, like this:
(defn sumation [a b]
(+ a b))
This appear to be a problem specially when I run a def
or defn
Oh yeah! That's actually working pretty well!
I've successfully created a node-library with Shadow, but my intention is to use the "module" in a Chrome extension (which doesn't consume modules). Should I just use Webpack on the side, or is there more sense in just using :target :browser
, marking my api fns with ^:export
?
what is a "module" in a chrome extension?
there is a dedicated :chrome-extension
target
Oh - didn't see that in the docs - thanks 🙂
its not in the docs yet. kinda unfinished but works ok