Fork me on GitHub
#clojurescript
<
2020-01-18
>
Philipp Siegmantel07:01:32

Hello everybody. How do you configure your cljs apps? For example, I'd like to point an image url to a placeholder in dev mode, so I can test my frontend independently of my backend. Googling only shows me either libraries that haven’t been updated for years or build tool configuration. I know I could simply set a symbol to a different map depending on the value of DEBUG, but this doesn’t feel clean. Is there something like vue.jses environment variables for ClojureScript?

Matti Uusitalo07:01:00

I'm mostly using figwheel so I would probably just use a resource folder. I'm always running a dev server for live coding anyway.

Philipp Siegmantel07:01:32

That solves the image problem, but my I'd also like to mock things like REST calls. Do you know a solution for the general problem?

thheller08:01:11

look into goog-define and :closure-defines

Andy Rusu12:01:55

Hi everyone, I'm making an "introduction to Clojurescript" talk at a local web meetup and I'm trying to make a list of points to talk about/show examples of during the talk for people that know web technologies, but not Clojure or ClojureScript. Do you guys have any suggestions about what would be some good and practical points to talk about? The things that I thought would be important are: data types which leads into syntax, REPL, figwheel, closure compiler, that you can use React and other JS libs and that you can target not just the browser but nodejs and things like electron, expo etc. I'm open to any suggestions. Thanks.

p-himik12:01:11

IMO shadow-cljs is worth mentioning, even if for the smooth NPM libraries integration alone.

👍 4
Andy Rusu12:01:15

good point, thanks

Adrian Smith23:01:03

Might be good to watch this talk to see how that one went: https://www.youtube.com/watch?v=ZZgeBBsHExU (cljs talk at BristolJS) and I'd suggest talking about graphql and state management alternatives in CLJS, (Fulcro Om Next etc) If you think you can talk about those alternatives confidently

Adrian Smith23:01:28

spec can also land quite well depending on your audience, given the up tick in Typescript it might be risky these days, would be good to hear back how it goes

Adrian Smith23:01:34

oh and immutability, functional programming and data orientated programming

Andy Rusu06:01:07

I'll take a look at that talk. I think I have a pretty good list of things to talk about. Thanks for your suggestions.

jmckitrick17:01:19

Does anyone know if the luminus CLJS template uses figwheel vs figwheel-main?

dpsutton17:01:48

what's the luminus template name? just luminus?

jmckitrick18:01:38

@dpsutton If you are asking me, I used +postgres +re-frame +auth

dpsutton18:01:58

yeah i was. i just ran the template to see if it used figwheel

jmckitrick18:01:34

It’s either figwheel or figwheel-main. That’s the question.

jmckitrick18:01:00

I’m starting a new project after a hiatus, so I need to commit to one or the other.

dpsutton18:01:06

it uses old figwheel

jmckitrick18:01:13

That’s what I thought.

dpsutton18:01:14

can i recommend using shadow-cljs instead?

jmckitrick18:01:03

Other than great node library integration, what else does it have, over figwheel-main?

dpsutton18:01:00

the author is quite responsive. figwheel-main is great but the author has joined a startup and can't devote much time to it much longer. The #shadow-cljs room is quite chatty these days with people willing to help and the author is around and quite helpful.

jmckitrick18:01:24

Sounds good to me!