This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-25
Channels
- # announcements (1)
- # beginners (70)
- # boot (2)
- # cider (12)
- # cljdoc (19)
- # clojure (25)
- # clojure-austin (1)
- # clojure-nl (2)
- # clojure-uk (9)
- # clojurescript (24)
- # cursive (7)
- # datomic (8)
- # figwheel-main (22)
- # flambo (1)
- # fulcro (16)
- # funcool (3)
- # jobs (1)
- # juxt (3)
- # off-topic (39)
- # reagent (4)
- # reitit (4)
- # ring (2)
- # shadow-cljs (90)
- # specter (11)
- # sql (2)
- # testing (2)
After upgrading shadow-cljs to the latest version 2.6.3, why does the log output still say "server version: 2.4.26" and "cli version: 2.4.26" ? If I do "which shadow-cljs" it does point to the new binary /home/simon/.nvm/versions/node/v10.8.0/bin/shadow-cljs
@urbanslug https://gitlab.com/urbanslug/sniff/blob/master/resources/public/devcards.html#L25
hmmm is it just me or does devcards still need saving for me to see the changes? I should probably watch the talk
I thought it would be the inventing on principle thing or storybook where I change text and the UI changes
you still need to save. something smarter would require pretty heavy compiler modifications
from what you're saying though I don't see a big difference between devcards and what shadow does. I could have shadow with a different build outputting to a different js file referenced by a different html and get the same result, right?
devcards is not responsible for any live-reloading or anything. that is done by shadow or figwheel
hmmm ok I should really finish reading the readme because defcard
doesn't even create a function
haha ya I clearly dk what this tool is for. 😄 I created a devcard and can't get those nice meters on it
(ns sniff.devcards
(:require [devcards.core :refer-macros (defcard)]
[devcards.core :as dc]
[reagent.core :as r]))
(def x 10)
(defcard simple-component [x]
[:div
[:p (str "I am a component!" x) ]
[:p.someclass
"I have " [:strong "bold"]
[:span {:style {:color "red"}} " and red "] "text."]])
(defn ^:export main
[]
(dc/start-devcard-ui!))
but this resource is proper http://rigsomelight.com/devcards/#!/devdemos.defcard_api
I can kinda see what devcards are for. Taking a component out and just seeing what's wrong with it in isolation
Hi! I'm working or re-frame/reagent application and somehow I cannot force shadow-cljs to do live reloading of page content. The strange part is that repl and browser are connect and when I save the file I see in the browser log:
shadow-cljs: load JS <name>
but he HTML on the page is not changed. When I refresh whole page I see the changes. Any tip what is going on? Or maybe where in shadow JS code I could look to debug itin reagent apps there typically is a call to render which you need to call again in the hooks
@thheller oh, I read the manual but somehow I've missed the need to add those hooks. Again you save me lot of time!
@thheller and of course it works, as you suggested I've added the hook to the main render method and I have my live reloading of HTML 👍
@richiardiandrea nice article on the cursive setup. one small nitpick: the source-map-support
install is not required. shadow-cljs
already depends on that and ensures that it is installed.
oh cool thank you
will fix that
I guess this is true only for npm
install though am I right?
also the new npx create-cljs-project foo
might be useful. skips the yarn init
+ yarn add
calls
@richiardiandrea not sure what you mean by npm
install?
I mean npm install shadow-cljs
yes that is already required basically. it provides the few dependencies we require.
ok cool, as long as it is it pulled transitively 😄 will add a comment on that, thank you!
taking the opportunity I have one more question (I've started using shadow-cljs few days ago and still try to figure out all the stuff - still I think it's superior work!): is there way to make live reload of work with the repl? I mean: when I run some code I repl I would like to see the changes in my reagent app
is create-cljs-project
a new thing? since which version?
@richiardiandrea you answered the post about it? https://clojureverse.org/t/project-templates/2694
oh, ok did not check after that 😉
also not sure if this would be a good idea 😉 and of course you've helped me again. When I've run the render method in repl I see my changes. Now I think my whole development environment is ready to do some coding 😉
@raf which editor are you using? in Cursive you could make a REPL command for (your.app/render)
and bind it to a key
@thheller if I find time maybe I will write small blog post about all the stuff you have learned my on this slack - maybe it safe you some time with "another me" next time 😄
I always try to note what questions people ask and update the docs accordingly but sometimes stuff gets in the way
😄 that is what I did for the Cursive blog post, that's great that you are always online Thomas, especially in terms of usability shadow-cljs
does not have rivals
true that! I find shadow-cljs
the best option right now, plus the possibility to ask you a question here is also extremely nice
@thheller I think your manual has all the bits that are needed, but sometimes if you're new to the subject it's hard to connect them in one story
@thheller yarn create-cljs-project cursive-shadow-cljs
does not work but the npx
version does
I think yarn
does not do project resolution from npm
@richiardiandrea not the extra space in my example. yarn
has a special create
command which is kind of a gimmick
wow completely missed reading that 😄
adding it to the post
Hello. I just started to play with shadow-cljs a few days ago. How do you start an external server from shadow-cljs? I have a boot file that starts a proxy server to backend API, and my re-frame app talks to the API server through this proxy. Is this something possible to do with shadow-cljs?