This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-04
Channels
- # announcements (8)
- # babashka (78)
- # beginners (15)
- # calva (6)
- # cider (12)
- # clerk (1)
- # clojure (46)
- # clojure-dev (13)
- # clojure-europe (15)
- # clojure-norway (5)
- # clojure-portugal (1)
- # clojure-uk (1)
- # clojurescript (23)
- # clr (29)
- # conjure (4)
- # core-async (10)
- # cryogen (1)
- # data-science (8)
- # hoplon (4)
- # hyperfiddle (11)
- # introduce-yourself (3)
- # jobs (6)
- # kaocha (12)
- # lsp (11)
- # malli (8)
- # membrane (11)
- # releases (1)
- # shadow-cljs (20)
- # spacemacs (47)
- # tools-deps (1)
I have a mixed js,cljs https://github.com/cnuernber/ham-scripted written js I would like to consume from another project. What is the recommended way of doing this? Is there an example of a mixed js,cljs npm module I can reference?
Potentially both pure js users and cljs but probably not initially. There are two js files that probably should be in a subdir and two cljs files at the moment
if you are ok with cljs only consumers for now you should just put the files on the classpath
them slap a goog.module("ham_fisted.BitmapTrie"); goog.module.declareLegacyNamespace();
in the first two lines
it might be picky about the _
vs -
situation. never tried a goog.module namespace with a -
but should be fine
The manual hacks are there to get hot reloading - I imagine there are similar hacks to get hot reloading of the goog module pathway.
That definitely worked - but it is really difficult to work with. The cljs file can't be recompiled without restarting the emacs cider connection and the js file cannot be recompiled without killing the repl process itself and restarting it.