This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-11
Channels
- # announcements (1)
- # beginners (35)
- # calva (28)
- # cider (14)
- # cljdoc (6)
- # cljs-dev (42)
- # cljsrn (2)
- # clojure (14)
- # clojure-spec (6)
- # clojure-uk (1)
- # clojurescript (13)
- # data-science (1)
- # emacs (3)
- # joker (3)
- # kaocha (1)
- # klipse (1)
- # leiningen (3)
- # off-topic (4)
- # pathom (10)
- # rewrite-clj (1)
- # shadow-cljs (28)
- # sql (5)
is per-build-target :source-paths / :dependencies config possible in shadow, or do i need to include all test stuff in the top level ?
I don't think it's possible with just shadow-cljs.edn
but it's definitely possible with shadow-cljs.edn
+ deps.edn
.
ha, that'll be something for the future then... i've had enough fiddling about with build-systems time (moving from boot-cljs -> shadow-cljs) to last me for a little while
Oh, but you won't need anything but Shadow-CLJS, even if you use deps.edn
. It's just an additional flag in shadow-cljs.edn
: https://shadow-cljs.github.io/docs/UsersGuide.html#deps-edn
it's the clj builds in the rest of the multi-module project still using lein which are stopping me... they will all need converting to deps.edn
...
Well, Shadow-CLJS also supports Lein - just scroll a bit above. It doesn't describe a way to directly call shadow-cljs
while specifying profiles but I bet you could do it if you launch it via lein itself.
i definitely don't want more lein in the build 😬... all the clj
build will be moving to deps.edn
at some point soon, and i'm using gulp
to run shadow atm, which is working very nicely
source-path and dependencies are global yes. usually it doesn't matter whats on the classpath though since the build decides what goes into it not the classpath
Running into TypeError: shadow.js.shim.module$react_native.Text is not a function
while trying to use :react-native
target. ns looks like this:
(ns my-app.mobile
(:require ["expo" :as ex]
["react-native" :as rn]
[rum.core :as rum]
[shadow.expo :as expo]
))
(rum/defc root
[]
(rn/Text #js {} "TEST"))
(defn ^:dev/after-load mount
[]
(expo/render-root (root)))
(defn start!
[]
(mount))
Seems like "react-native"
is defaulting to some kind of shadow shim, but I’m likely doing something wrong…Oh…I have to “adapt” the react element:
(rum/defc root
[]
(r/createElement rn/Text #js {} "TEST"))
Indeed. Came up with this for now:
(defn >$
[class props & children]
(apply r/createElement class (clj->js props) children))
(def view (partial >$ rn/View))
(def text (partial >$ rn/Text))
is there a way to expose the shadow-cljs required module through the current namespace?