Fork me on GitHub
#clojurescript
<
2017-01-24
>
benzap03:01:27

@plexus, @bhauman, Found out what the issue was. Google chrome was caching the previous build, which prevented the websocket from connecting. Everything looks to be fine now.

iGEL10:01:07

Hello! I have two reagent apps, which share the same project.clj at the moment. But now I want to use material ui in one of them, which brings it's own react. So I need to exclude it for one app from the dependencies (`[reagent "0.6.0" :exclusions [org.clojure/tools.reader cljsjs/react]]`), which breaks the other app. Can I somehow use the same lein cljsbuild process to build both (maybe with lein profiles?) or should I separate them completely and run the build process twice?

pesterhazy10:01:30

why not use the same deps in both apps?

iGEL10:01:46

That is what we did before, but switching both to material is not an option. And as I said, the material dependency brings it's own react, so I need to exclude it (see https://github.com/madvas/cljs-react-material-ui#installation)

iGEL10:01:06

which in turn breaks the other app 😒

hlolli10:01:29

@igel the README is bit misleading, in the newest cljs-react-material-ui you only need to exclude react and react-dom, the example is outdated for reagent.

iGEL10:01:52

Thanks for pointing that out. 👍 But still I don't know how can I exclude it from one build, but not the other

pesterhazy10:01:03

I don't understand, why not exclude it and explicitly specify it in both cases?

iGEL10:01:41

So, you suggest to explicitly require the react bundled with material ui in the non-material app? Or what do you mean by explicitly specify it in both cases?

iGEL10:01:54

In the readme, they suggest to remove the entire react dependency from reagent, so it won't be available, will it?

pesterhazy10:01:57

reagent just picks what's in window.React

pesterhazy10:01:39

to explicitly specify deps, just lad the cljsjs.react you want and exclude it everywhere it's implicitly required (e.g. material-ui, reagent)

pesterhazy10:01:24

check with lein deps :tree to see if you caught 'em all

iGEL10:01:24

Sound good. I will try to do that

bobcalco18:01:34

Anyone have experience wrapping Bootstrap for use in ClojureScript? Or any (ideally successful) encounters of interop between Bootstrap in JS and ClojureScript code?

bobcalco18:01:40

Sorry I meant Backbone

bobcalco18:01:56

not Bootstrap

bobcalco18:01:11

I’m looking at using commercial components built in/on BackboneJS and would like to use them in ClojureScript vs ES5 or ES6.

dnolen18:01:13

@bobcalco it’s possible, but it’s not really a popular option since BackboneJS isn’t particularly FP friendly

dnolen18:01:11

still you can probably make it work alright, but I’m not aware anything new-ish that does that. Some people were doing some Backbone stuff 3 years ago if I recall.

dnolen19:01:25

yep shooting for a release Friday, there’ll be a new guide on the ClojureScript website that walks everyone through it

talexxx19:01:43

What’s the best approach to reading CLJ macros in CLJS? I keep running into issues that seem to be just plain syntactical

bobcalco19:01:43

@dnolen Yeah I’ve seen that - thanks. Looking forward to CLJS automatically generating externs. 🙂

bobcalco19:01:12

seems to me the sweet spot for ClojureScript with Backbone would be in the Model abstraction, and possibly the wiring (controller). But yeah — Backbone is MVC is noun-centric is not FP friendly, that’s the issue.

skelter23:01:12

Using figwheel on a clojurescript project. I was expecting cors headers so I could point to a specific server, but I’m not seeing them. Do I need to configure that?

darwin23:01:59

otherwise you are always free to serve the files using your own dev server and configure it however you like

skelter23:01:02

darwin: yes, I agree. and I am using 0.5.8 which has that.