Fork me on GitHub
#clojurescript
<
2022-04-01
>
Mark Gerard01:04:51

Hello, I am running this command ❯ clj -m cljs.main -O advanced -c "foo.bar"However, I am getting this warning: WARNING: Implicit use of clojure.main with options is deprecated, use -M.A https://www.google.com/search?client=safari&amp;rls=en&amp;q=WARNING%3A+Implicit+use+of+clojure.main+with+options+is+deprecated%2C+use+-M for this is not returning great results. It is a warning, but any pointers as to what I might be doing wrong?

p-himik01:04:18

Just add -M after clj. Also, when you search such things, always surround the query with double quotes. Google treats -M as "exclude results containing M". Of course, since it's a single character it doesn't matter much (I think), but if you try with double quotes you will definitely get relevant results.

🙌 1
Mark Gerard01:04:00

Thanks @U2FRKM4TW - I am now getting this error:

Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-d (No such file or directory)
Command: clj -M -O advanced -c foo.bar

p-himik01:04:45

Why did you remove -m cljs.main?

Mark Gerard01:04:07

thanks, that worked. I assumed you need one

p-himik01:04:38

Yeah, you need both. :)

Richie12:04:12

Hey!

grid-template-areas: 
            "a a a"
            "b c c"
            "b c c";
How do I write this in hiccup? It has multiple string values for one key and I haven't got anything working. I'm trying to do it inline in a div. i.e.
[:div {:style {:grid-template-areas "a b c d d d"}}]
Thanks!

p-himik12:04:39

Probably more appropriate for #reagent Have you tried "\"a b c\" \"d d d\""?

Richie14:04:18

Omg. I had a typo. Thanks. :grid-template-areas "\"a b\" \"c b\" \"d d\"" does actually work. I was trying an invalid config over and over. :grid-template-areas "\"a b\" \"c d\" \"d d\"" ..................................^ I had d but I wanted b

Richie14:04:54

I also made my question harder for you to answer since my example code didn't match the example css. Sorry.

p-himik14:04:09

No worries, I didn't actually try to parse the string. :D

Quentin Le Guennec18:04:52

Hello, how can I override the console object in clojurescript?

p-himik18:04:57

(set! js/console ...). But if you really have to change the default behavior, I'd override specific methods, like .log.

p-himik18:04:06

(set! js/console -log ...).

chromalchemy21:04:52

What is the way to express this js this.myFn(data); I am aware of this-as , but I’m not sure how to phrase it. https://cljs.github.io/api/cljs.core/this-as In (this-as this (myFn data)) , where does the this go? Does myFn need to take an extra param?

thheller21:04:47

(this-as obj (.myFn obj data))

thheller21:04:21

this-as just lets you provide a name for the JS this. doesn't need to be this. after you have that name its just regular JS interop as above