Fork me on GitHub
#clojurescript
<
2017-05-26
>
souenzzo02:05:03

someone using lein doo here? There is some way to separate build from execution? I want to lein doo build -> target on clojure docker than phantomjs run target/doo.js in another docker

minikomi04:05:52

Was mucking around testing some ways to update a map in a loop.. Pretty interesting: https://gist.github.com/minikomi/a536cbcd8c476437bd78f2d1735c3c90

minikomi04:05:08

need a better test i think. .advanced optimization is reducing it down to the answer 😆

iku00088806:05:47

Does anyone happen to know a password protect a file solution that works on the browser?

pesterhazy09:05:10

I'm packaging a library, https://github.com/igorprado/react-notification-system, for cljsjs. To do that, can I use the provided UMD build? Webpack can have different libraryTargets: var and umd - are both usable as a basis for cljsjs packages?

pesterhazy10:05:13

got it to work with libraryTarget: "var"

danielstockton11:05:23

Is there anything in Google Closure to reliably detect a mobile device?

danielstockton11:05:16

goog.userAgent.MOBILE did the trick

robert-stuttaford11:05:10

such a treasure trove of goodies in that library

osmirnov14:05:15

Hello, I'm trying to use :npm-deps feature, and I get now

process is not defined
, I think that I need to set NODE_ENV, but how to do it? Does anybody knows?

omkar15:05:16

Hello all

anmonteiro15:05:45

@osmirnov the workaround is to create a process.env namespace in your project with a goog-define for NODE_ENV

souenzzo16:05:04

Up? 😞

noisesmith18:05:39

I’m working on a library that’s intended to make it easy to capture data from a running app, and then load that data into tests. I’m trying to make this work with cljs now. Is there a straightforward way to load data from a resource directory in my cljs unit tests, ideally one that would also allow loading example data into a figwheel repl? I can think of multiple ways to do it but would appreciate advice from people who use cljs more and are more familiar with the limitations / idioms of the js ecosystem.

noisesmith18:05:48

right now I’m dumping the data by creating an anchor with a data url and generating a click event so the browser downloads the encoded data

lepistane19:05:52

what are good resources to learn cljs? what are prerequisites ? do i need to be proficient in JS before trying cljs or something like that?

shaun-mahood19:05:03

@lepistane: Definitely don't need to be proficient in JS. There are some good resources at https://clojurescript.org/community/resources as well as the rest of that site, though some parts can be pretty hard to understand depending on your current knowledge. The #beginners channel here is also very good for specific questions as you get started, lots of helpful people on there ready to help. Have you got much programming experience (in Clojure or other languages)?

shaun-mahood19:05:30

@lepistane: A lot of the books at https://clojure.org/community/books also have ClojureScript specific content as well.

lepistane19:05:17

@shaun-mahood second year of cs university made 2 websites with wordpress 1 webforum java servlets backend, jquery,html,boostrap,css frontend played around with clj - had to read SICP since i had no experience in functional programming and no book/resoureces offers that in clojure have upcoming project with spring on backend, wanted to learn cljs and use it as frontend so i am asking for resources thank you for links would you say this is enough knowledge to get started?

shaun-mahood19:05:22

@lepistane: I definitely think that is enough to get started! I found re-frame to be a really good way to get started with CLJS and the docs and #re-frame channel are both excellent for support.

shaun-mahood19:05:44

There are a lot of other good options as well that provide similar functionality as well - https://www.clojure-toolbox.com/ is a good site to browse for options across the whole ecosystem.

lepistane19:05:31

thank you very much

shaun-mahood19:05:01

@lepistane: My pleasure! I hope you have a lot of fun on your project, definitely ask lots of question as you get stuck.

dnolen20:05:05

I just cut org.clojure/google-closure-library and org.clojure/google-closure-library-third-party version 0.0-20170519-fa0499ef, might want to take that for a spin