Fork me on GitHub
#re-frame
<
2018-08-12
>
kennytilton05:08:45

No, @pauld, just HTML/CSS/JS. mxWeb is a thin wrapper intended to have the same API as true HTML and CSS, doing no more than wire them for Javelin-like data flow.

kennytilton05:08:53

mxWeb API will be next write-up, I think, so the full TodoMVC is easier to parse.

henrik07:08:46

@hiskennyness It looks like you have a competitor: https://mxweb.mnx.com/

henrik07:08:53

Yours looks a lot better, I have to say.

pauld11:08:07

Thanks @hiskennyness Very interesting project.

pauld11:08:46

I'd be curious to know if the deployed artifact (optimized main clojurescript file) would be any smaller compared to a typical react (reagent) project say for a todoMVC app.

kennytilton15:08:49

@pauld Thx. I just did lein fig:min for the first time, dev-main.js is 551k if that helps. Where do reagent apps come in?

kennytilton15:08:13

@henrik Nice find. I am putting you in charge of the mxWeb re-naming contest. 🙂

pauld15:08:57

I can't give you a really good example at the moment, but react-0.14.3.min.js is 414K.

pauld15:08:08

So that's the starting point.

pauld15:08:25

qlkit-todo-demo has a js file of 1.8M but it may be including a lot of other js libraries.

pauld16:08:12

Well, I don't know what I'm talking about because using lein new reagent <app-name> and compiling using lein cljsbuil once min outputs a file of size 321K.

pauld16:08:02

Also reagent seems to depend on these: [cljsjs/react "16.4.1-0"] [cljsjs/react-dom "16.4.1-0"] [cljsjs/react-dom-server "16.4.1-0"] [cljsjs/create-react-class "15.6.3-1"]]

kennytilton16:08:17

I just tried the prod build Reagent has on the TodoMVC site and it fails. Bit rot, I presume.

kennytilton16:08:57

I took out the mxXHR “lift” which add adverse event lookups to TodoMVC, down to 421k.

kennytilton18:08:23

Ah, built right from the Reagent repo and TodoMVC builds fine. 302k. I have not given any thought to min size. It would be interesting to see where I am gaining all that weight.

pauld20:08:46

Any code that relies an non-closure (sic) enable javascript libraries (virtually all of them) will not have dead code eliminated by the compiler.

pauld20:08:08

I wonder if there's a library that will print out the dependency tree for a clojurescript project. Then you could just look for the javascript dependencies - as opposed to the cljs/cljc/clj ones.