Fork me on GitHub
#clojurescript
<
2018-11-22
>
idiomancy05:11:19

does anyone know how to compile a re-frame project that uses deps.edn?

idiomancy05:11:01

how do I output all of my html, js, and css into some output directory using all the magic of the closure compiler?

idiomancy06:11:33

got it more or less figured out

niels08:11:34

how'd you do it?

dnolen08:11:19

there's really nothing special about re-frame

dnolen08:11:25

should work for anything

idiomancy12:11:08

yeah. a change of note that I had to make to adapt the standard re-frame template to work with the process outlined in there: in the example.core namespace, I changed init to -main in index.html, I changed <script>example.core.init();</script> to <script>example.core._main();</script>

idiomancy12:11:41

there's probably some config flag that specifies what function to use, and I could have kept it as init, but I couldn't find it

idiomancy12:11:45

once that was done, yeah, I just ran clj -m cljs.main --optimizations advanced -c example.core and grabbed the resulting out/main.js, and threw it in a separate folder (manually) along with a copy of the index.html file (with the script line changed to point to main.js) and then it all worked lol

idiomancy12:11:04

that's why I said "more or less" figured out 😅

Whiskas16:11:10

Guys, when i want to run a Clojure repl, i simply type lein repl on terminal. How do i open a Clojurescript repl as easly as that?

enforser16:11:12

https://github.com/bhauman/figwheel-main

clj -Sdeps "{:deps {com.bhauman/figwheel-main {:mvn/version \"0.1.9\"}}}}"  -m figwheel.main
There are also instructions for how to do it with lein on that page

😀 1
dnolen16:11:23

@mateus.pimentel.w you don't need all that to start a REPL

dnolen16:11:46

clj -m cljs.main -r if you're using deps

Whiskas16:11:51

i made an “alias”

dnolen16:11:53

everything else is extra

Whiskas16:11:18

like, to use when i want a repl that is not attached to any project

Whiskas16:11:56

but that’s nice too

lilactown16:11:36

it starts up with rebel-readline (for syntax highlighting, autocomplete, etc.) and also lets me specify deps to load

mfikes16:11:52

@mateus.pimentel.w Lumo and Planck are also nice if you just want to quickly fire up a REPL to try out a few forms

mfikes16:11:22

I also have a modified clj named cljs on my system that does what you’d expect. (Hoping something like that ultimately ships with clj.)

bellp23:11:06

I’m having trouble finding cljs.spec.test.alpha. I can require cljs.spec.alpha without any problems. Any ideas?

mfikes23:11:31

@bellp you need test.check available as a dependency in order to load that ns

bellp23:11:43

ahh perfect, it works now. Thanks!