Fork me on GitHub
#clojurescript
<
2017-04-23
>
lxsameer09:04:14

a basic hello world application in re-frame ended up with ~500K in size after production build. Is it normal ?

lsenjov09:04:05

With google closure optimisation?

lsenjov09:04:34

No idea, just thought it was something to try

martinklepsch09:04:36

@lxsameer sounds about right. Consider that you usually gzip that which should bring it down to around 100K

lxsameer09:04:19

@martinklepsch ok then, thanks 😉 Just wanted to make sure

mitchelkuijpers12:04:39

Does anyone know how you would require a module with the new :npm-deps feature that is named like this one: https://www.npmjs.com/package/@atlaskit/button I cannot require @atlaskit/button

mitchelkuijpers12:04:30

btw @petterik you can do :npm-deps {"@google/maps" "0.3.1"} but that does not solve the second problem

grav13:04:46

@mitchelkuijpers Won’t (cljs.nodejs/require "@atlaskit/button") do the trick?

mitchelkuijpers13:04:21

@grav I am not targeting nodejs unfortunately

grav13:04:50

So :npm-deps works without node? Didn’t know that

mitchelkuijpers13:04:32

@grav Yes npm supports a browser field in the package.json files, that is why you can use stuff like react from npm ^^

alexwheeler16:04:15

are there any good docs on getting a clojurescript repl hooked up to a library I want to contribute to. I've used figwheel for web apps and its great, but I'm trying to develop a feature for a library and not sure how to hook a repl to the project?

dominicm17:04:09

@mitchelkuijpers is goog.require what you're after perhaps?

lxsameer17:04:31

hey guys, In reagent/re-frame How can I use an other component(function) inside properties of an other component ?

grav18:04:46

@lxsameer Something like this?

(defn my-wrapper [{:keys [title]} & [content]]
  [:div
   [:h3 title]
   content])

[my-wrapper {:title "The Title"} 
 [:div "Content goes here"]]