Fork me on GitHub
#lumo
<
2017-11-15
>
pesterhazy13:11:10

@hlolli does goog/global.setTimeout work?

hlolli13:11:52

@pesterhazy I remember seeing that it didn't work either. I'm compiling a release binary now at the moment and will quickly find out if this is only a problem with the dev build or not.

baptiste-from-paris13:11:13

Hello friends, I struggle to make puppeteer working with lumo To make puppeteer work, you need to inject javascript into browser context where offcourse browser knows nothing about cljs Maybe one way would be to inject cljs into every page but I am wondering if there is a way to compile in my code cljs to make it work

hlolli13:11:11

Have you tried building your code with lumo.build.api?

baptiste-from-paris13:11:53

nope I should do that, not cool for REPL experience though but I think I don’t have a choice

hlolli14:11:09

no I guess you'd only do it when you'd be makeing releases, you can do autobuild as well tough.

baptiste-from-paris14:11:22

but from the repl ?!

baptiste-from-paris14:11:32

I am using tubular with cursive

hlolli14:11:27

No not from the repl, you want to do something like cljs string to js string in the repl in runtime?

baptiste-from-paris14:11:42

would be good for dev ^^

hlolli14:11:05

There are some tricks where you give the compiler empty environment, I forgot how that command was. But I don't see a good way to get good dev experience in your case useing cljs. Maybe figwheel or something could work with this headless browser.

hlolli14:11:48

It's still on my todo list to compile with lumo build to stream instead of file implicitly. But I still can't see how that would work in non-advenced compilation as we always end with many files that need to be placed in according folders.

baptiste-from-paris14:11:37

ok, no worries, I’ll try building the js instead

metametadata15:11:19

Doh. I simply have to add -K flag when running REPL and :reload-alls become almost immediate. Somehow I thought that -K only helps when loading code from files.

hlship17:11:21

I'd love to see more intro documentation about Lumo: - Syntax for requiring NodeJS modules - Syntax for invoking function imported from NodeJS - Tutorial on adding NPM modules to Lumo app I eventually worked out most of these, and technically it's in the ClojureScript documentation, but it would be nice if it was all laid out in one place.

baptiste-from-paris17:11:05

@hlolli for information, it’s working really well by using the .addScriptTag of pupeteer and adding cljs with klipse

hlolli20:11:11

nice, hope it works for you. Can imagine dev and production to differ somewhat, but doesnt have to be.

baptiste-from-paris17:11:30

even if I could compile it myself, I was just lazy ^^

richiardiandrea18:11:20

@hlship I think the best place would be the wiki or a proper readthedocs page...unfortunately I don't have the time for bootstrapping that at the moment, but can contribute once it is going

anmonteiro18:11:24

@hlship agreed. A documentation website is on the roadmap but I have been busy

hlship19:11:08

I'm good with readthedocs, I've used it successfully for several projects. Easy. I may have time to put together a PR on Friday.