This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-26
Channels
- # aleph (5)
- # announcements (9)
- # beginners (115)
- # boot (36)
- # calva (13)
- # cider (4)
- # clara (7)
- # cljs-dev (27)
- # cljsrn (20)
- # clojure (182)
- # clojure-conj (3)
- # clojure-dev (4)
- # clojure-europe (3)
- # clojure-italy (2)
- # clojure-nl (4)
- # clojure-uk (34)
- # clojurebridge (3)
- # clojurescript (19)
- # clojureverse-ops (3)
- # core-typed (1)
- # cursive (12)
- # data-science (3)
- # datomic (16)
- # emacs (9)
- # events (5)
- # figwheel-main (11)
- # fulcro (14)
- # graphql (7)
- # jobs (10)
- # jobs-discuss (6)
- # lein-figwheel (8)
- # leiningen (2)
- # lumo (22)
- # mount (1)
- # nrepl (7)
- # off-topic (69)
- # overtone (17)
- # pathom (3)
- # quil (1)
- # re-frame (5)
- # reagent (23)
- # reitit (6)
- # remote-jobs (1)
- # rewrite-clj (4)
- # ring (38)
- # shadow-cljs (54)
- # sql (9)
- # uncomplicate (5)
- # xtdb (1)
is it possible to set the nREPL port by build so I can have both tests and the browser target running at the same time?
@polymeris why would that require different ports? you can just open multiple connections?
that only matters if the port conflicts with other projects? one project only needs one nrepl port and can serve many builds under that port?
Hmm, maybe I am doing it wrong.
But I am running shadow-cljs watch browser
and shadow-cljs watch test
in parallel, and since they both try to use the same port for nREPL, one of them will complain
ok first of all it is fine to just run shadow-cljs watch browser test
in one process
if you start shadow-cljs watch browser
and shadow-cljs watch test
at the same time manually
and then run 2 separate watch instance that will just use the running server instead of starting their own JVM instances
all builds can be running at the same time and you can either switch between the REPLs
hello people. I'm trying to use react-pose
(https://popmotion.io/pose/learn/popmotion-get-started/) with reagent
through shadow-cljs
🙂
This might actually be a reagent
question, but I thought I would start here
Basically, the example says to do
const Box = posed.div();
and this is what I do in cljs
(:require ["react-pose" :default posed])
(def box (.div posed))
but then I cannot render this and I have tried the following ways:
[:> box]
[box]
(reagent/as-element [:> box]
env.cljs:191 error when calling lifecycle function one.core/start TypeError: Cannot convert a Symbol value to a string
@bravilogy that looks like you are maybe trying to print the result of that call?
(defn start []
(reagent/render-component [hello-world]
(. js/document (getElementById "app"))))
I tried react-spring
as well, but since their new version is using hooks, it makes it difficult
is anybody using shadow for AWS lambdas? Can I peek at your shadow-cljs.edn
😄 ?
i'm following the example from the docs for shadow-cljs compile npm . .. no errors but when i try to use the package in node
> var x = require("shadow-cljs/demo.foo");
{ Error: Cannot find module 'shadow-cljs/demo.foo'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
any ideas?
nevermind i figured it out, but i think i'll submit a PR to explain it for the next guy
@clojuregeek what was the issue? the :npm-module
docs are a bit light and could definitely be improved
@thheller the default shadow-cljs.edn has src/main whereas I has my files in src/demo/foo.cljs
so i think it just needs to update if you are using the new shadowcljs.edn to set the src
thanks 🙂
@richiardiandrea using it with google cloud functions, happy to share if that would help
@martinklepsch thanks a lot! I think I have a good setup now:
{:source-paths ["lambda-src"]
:builds {:aws {:target :node-library
:exports {:handler ingest-events.aws/handler}
:output-to "ingest-events/index.js"
:js-options {:js-provider :shadow
:keep-native-requires true}
:release {:compiler-options {:source-map true
:optimizations :simple}}}}}
this way I am producing a self-container index.js
exposing the handler only
yeah, that's similar to what we're doing
we use exports-var
but not much of a difference
cool awesome thank you again 😄