Fork me on GitHub
#shadow-cljs
<
2019-12-19
>
heyarne12:12:43

Can I see where a particular is required? Ideally the whole graph from the entry to the namespace? I have cljs/analyzer.cljc (which I could figure out thanks to npx shadow-cljs run shadow.cljs.build-report app) in my bundle and I'd like to know why.

aisamu13:12:05

@arne-clojurians Programatically or once? That kind of info is available on the build's info page (localhost:9630) Scroll down and there'll be a drop-down. Pick your target ns and you'll be presented something like this:

Namespace: cljs.core.async via: cljs/core/async.cljs
Entries that led to the inclusion of this namespace
shadow.cljs.devtools.client.browser -> shadow.cljs.devtools.client.hud -> cljs.core.async
shadow.test.browser -> shadow.dom -> cljs.core.async

👍 4
Vít Kalisz15:12:44

I would like to start using Material-UI in my project. I started with some experimentation as follows:

(ns orgpad.client.views.widgets.md-button
  (:require ["@material-ui/core/Button" :as button]))

(defn md-button []
  [:> button/Button {:color :primary :variant :contained} "button"])
When calling md-button, the following error occurs:
react.development.js:168 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
How does the requiring work? Why does this occur?

tianshu17:12:47

can I let browser test use pprint?

tianshu17:12:11

some output like

(not (= [{:foo/id {1 {:foo/id 1}}} {:bar/id {1 {:bar/id 1, :bar/foo [:foo/id 1]}}}] [{:bar/id {1 {:bar/id 1, :bar/foo [:foo/id 1]}}} {:foo/id {1 {:foo/id 1}}}]))
is really hard to read in the browser.

kenj18:12:49

I see shadow can generate a POM file to be used in Cursive IDE. Can someone point me in the right direction on how to import that such that depdencies are resolved by Cursive, and I can stop copy n pasting the deps into deps.edn to get Cursive symbol resolution and auto-complete to function?

kenj18:12:05

I feel like this would be much easier if I had a Java background =/

thheller18:12:25

@risinglight you click "create new project from existing sources" and select the pom.xml file

thheller18:12:40

if that doesn't work you might not have the maven plugin installed

kenj18:12:05

awesome, that seems to have done the trick!

kenj18:12:55

I appreciate the help, and also building this kick ass tool. I feel like I might actually be able to tackle a CLJS side project now.