This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-11
Channels
- # architecture (3)
- # beginners (41)
- # boot (7)
- # cider (16)
- # cljs-dev (8)
- # cljsrn (2)
- # clojure (214)
- # clojure-austin (4)
- # clojure-russia (52)
- # clojure-spec (8)
- # clojure-taiwan (1)
- # clojure-uk (10)
- # clojurescript (87)
- # cursive (14)
- # datascript (34)
- # datomic (11)
- # dirac (55)
- # emacs (12)
- # hoplon (44)
- # luminus (6)
- # lumo (24)
- # off-topic (1)
- # om (8)
- # onyx (7)
- # overtone (2)
- # pedestal (1)
- # protorepl (4)
- # re-frame (7)
- # reagent (1)
- # ring (4)
- # rum (2)
- # slack-help (1)
- # spacemacs (2)
- # specter (32)
- # unrepl (131)
- # untangled (14)
- # yada (3)
can lumo compile foreign-libs? I have a deps.cljs
on my classpath, but it seems lumo ignores it
@moxaj by compile you mean use the build API or just be able to call them in the repl?
@richiardiandrea call them in the repl
so for that you just need them on the classpath using the -c
argument
I don't think, but I might be wrong and Antonio can correct me, that lumo
does automatic resolution (yet)
no automatic resolution
@moxaj but if you include, say Om Next (which has a deps.cljs
file that requires cljsjs.react
), you can require cljsjs.react
in the REPL but you need to include all the JARs in the classpath
@anmonteiro I'm trying to load my own library, with its own deps.cljs
sorry, but that doesn't add anything to what I said
I'm happy to help you solve whatever is wrong with your project but you need to provide more details
sure. So I have src/js
on my classpath, inside which there's a deps.cljs
and some .js
files. Then I call lumo with lumo -c <classpath> ...
, and I get a No such namespace ...
error.
can you paste the contents of your deps.cljs
file?
{:foreign-libs [{:file "base64-js/index.js"
:provides ["ferros.base64-js"]
:module-type :commonjs}
{:file "ieee754/index.js"
:provides ["ferros.ieee754"]
:module-type :commonjs}
{:file "buffer/index.js"
:provides ["ferros.buffer"]
:requires ["ferros.base64-js" "ferros.ieee754"]
:module-type :commonjs}]}
this is my very first time trying to bundle foreign libs, so the error is probably on my end ^^
does it work in the JVM ClojureScript compiler?
you need to understand we don't support CommonJS module resolution
so that's probably the problem
ClojureScript has commonJS resolution
@moxaj it's planned to see if we can leverage google-closure-compiler-js to do it
I'm still unsure, haven't looked into it