Fork me on GitHub
#shadow-cljs
<
2018-10-01
>
markx19:10:04

Hello all! I just found about shadow-cljs. Looks really nice!

markx19:10:14

I just have one quick question: I heard figwheel is the one to use for live loading code change into repl and browser. Does shadow-cljs also take care of this functionality? In the same way figwheel does it?

thheller19:10:36

@markx welcome and yes it has the same functionality

markx19:10:21

great! once less thing to deal with 🙂

markx19:10:19

I have to say, shadow-cljs really seems to solve the pain for beginners from JS world.

thheller19:10:12

that was kind of the goal yes

markx19:10:01

Does shadow-cljs use figwheel under the hood, or implement live loading in its own way?

thheller19:10:28

not using figwheel no. it has its own impl.

markx21:10:23

What’s the recommended way to create a new project that uses shadow-cljs?

markx21:10:26

I mean something like lein template, or some command like npm init that generates necessary files.

thheller22:10:10

@markx npx create-cljs-project foo-bar works but its still a work in progress

thheller22:10:25

still figuring out how to best handle templates

markx22:10:04

this create-cljs-project is an npm module?

thheller22:10:25

its a script on npm yes

thheller22:10:32

run it with npx or yarn though. don't install it

thheller22:10:55

there are also some lein templates though if you prefer those

markx22:10:40

hmm why not install it?

thheller22:10:05

well its a one time use and by not installing it you ensure that you always get the latest version

thheller22:10:19

similar to create-react-app etc

thheller22:10:34

you can install it but you don't gain much by doing so

markx22:10:54

I see. Yeah I never used npx before. I guess this is a bonus

thheller22:10:16

yarn create cljs-project foo-bar if you prefer yarn

thheller22:10:38

npx is useful for running things without isntalling them

markx22:10:01

pretty nice.

markx22:10:13

Could you also recommend me a lein template?

markx22:10:55

hmm <script>starter.browser.init();</script>. What should this be if my namespace is something like foo-bar.core?

markx22:10:30

I know this is something from the closure lib, but maybe it’s confusing for normal js people.

markx22:10:11

ah I see. foo_bar.core then