Fork me on GitHub
#cljsrn
<
2020-05-24
>
bhauman00:05:02

@raspasov great

bhauman00:05:47

@raspasov do you use require to include images/pngs in your application code?

raspasov00:05:19

@bhauman no… Most of the images I generally load are remote

raspasov00:05:27

But I can give it a try just to confirm

bhauman00:05:51

yeah I’m not sure that (js/require "./assets/my-image.png") works in cljs file

raspasov01:05:31

ok let me try…

raspasov01:05:58

@bhauman as long as I have the line:

// npmDeps["./assets/logo.png"]= require("./assets/logo.png");

raspasov01:05:03

it seems to work

bhauman01:05:27

thanks! that’s what I thought

bhauman01:05:48

and you mean not commented out

bhauman01:05:00

that makes sense

raspasov01:05:08

Just tried that; Doesn’t seem to work : D

raspasov01:05:03

Adding a line in index.js is really not a problem IMO for images; at least not a problem for me, since I don’t use many of them

pez08:05:20

Hello! I am configuring Calva for use with Krell. Since there are a few places where one could go wrong, I'd like to add a section on the tooling page on the Krell wiki, but it is not publicly editable. How do I go about it? 😃

dotemacs08:05:05

Ping David Nolen about it

pez09:05:52

Newbie Krell question. When I have both the Android Emulator and the iOS Simulator connected they seem to tale turns hot reloading code changes. Is there a way I can get both to hot reload all changes?

pez09:05:52

Also the REPL connects and disconnects every other second.

Connected to Krell REPL Server
krell_repl.js:413 Closed connection with {port: 5001, address: "192.168.1.205"}
krell_repl.js:428 Connected to Krell REPL Server
krell_repl.js:413 Closed connection with {port: 5001, address: "192.168.1.205"}
krell_repl.js:428 Connected to Krell REPL Server
krell_repl.js:413 Closed connection with {port: 5001, address: "192.168.1.205"}
krell_repl.js:428 Connected to Krell REPL Server
krell_repl.js:413 Closed connection with {port: 5001, address: "192.168.1.205"}
krell_repl.js:428 Connected to Krell REPL Server
krell_repl.js:413 Closed connection with {port: 5001, address: "192.168.1.205"}
krell_repl.js:428 Connected to Krell REPL Server
krell_repl.js:413 Closed connection with {port: 5001, address: "192.168.1.205"}

olivergeorge10:05:12

I don’t think David designed Krell REPL to support multiple clients

dnolen17:05:43

yeah multiple clients not supported and not a priority for the first release

dnolen17:05:51

@bhauman fwiw getting Figwheel up to Krell's level wouldn't be particularly hard - the js/require stuff is actually pretty straightforward

dnolen17:05:22

Krell does it with compiler passes and caching into the analysis

bhauman17:05:24

Yeah I saw the passes code thats what made me think of it

bhauman17:05:19

@dnolen thanks I’m planning on giving it a shot

pez21:05:50

Krell: I fail to display an assets image. Doing (def splash-img (js/require "../assets/pic.png")) and then [rn/image {:source splash-img :style {:width 200 :height 200}}]. I don't know from where the relative path starts, but I've tried about every permutation.

raspasov22:05:43

@pez probably “./assets/pic.png”

raspasov22:05:29

Assuming “assets” is in the top-level project directory