Fork me on GitHub
#boot
<
2016-12-17
>
grounded_sage11:12:21

I've got a HTML file nested inside a folder in my site directory. It seems that boot reload doesn't work for me on that particular file. I tried putting a forward slash at the front of app.js in the template HTML file however that broke all boot reloading. Is there a simple fix for this. It is not immediately obvious to me?

borkdude12:12:06

Iโ€™m trying out https://github.com/adzerk-oss/boot-bookmarklet and run into a problem

borkdude12:12:28

I want to make a bookmarklet which sets the scroll location using something from localstorage:

(do (set! (.. js/document -body -scrollTop)
          (.getItem js/localStorage "scroll-y"))
    js/undefined)

borkdude12:12:39

but when I click it, it displays the scroll value as the content of the page

borkdude12:12:29

The generated code seems to end with:

if(P=y)P=9<=I;J=P}J||A&&G("1.9.1");y&&G("9");document.body.scrollTop=localStorage.getItem("scroll-y");
which might be the problem

borkdude12:12:57

because it returns a value

martinklepsch12:12:29

@borkdude you could try :output-wrapper (compiler option)

borkdude12:12:30

I donโ€™t see yet how to provide that option with this boot task

borkdude12:12:01

is there no other way to force returning undefined from the generated code?

martinklepsch12:12:03

@borkdude do you invoke the cljs task yourself or does the task do it for you?

borkdude12:12:07

maybe it would be a good default setting for the task though

borkdude12:12:40

I should probably write this as a Chrome extension anyway

martinklepsch13:12:51

@borkdude there's an issue that discusses what should be the default, you can weigh in if you like: https://github.com/adzerk-oss/boot-cljs/issues/64

borkdude13:12:24

for general cljs I donโ€™t think it should be the default, but for this task it makes a lot of sense

martinklepsch13:12:59

should be easy to create a PR for boot-bookmarklet (easier than switching to making a chrome ext ๐Ÿ˜„ )

borkdude13:12:06

yeah, Iโ€™m testing it now

borkdude13:12:12

but maybe there are other people who want to return something from their bookmarklet, probably should be configurable

borkdude13:12:36

I think it would be best if people could just override whatever compiler settings

borkdude14:12:00

Creating an extension was actually easier than I though: https://github.com/borkdude/restore-scroll

martinklepsch15:12:07

no more cljs though ๐Ÿ˜› (which in this situation makes sense I guess ๐Ÿ™‚ )

borkdude15:12:08

yeah, if your code is small and 90% interop or more, it makes sense ๐Ÿ˜‰

grounded_sage23:12:43

how do I check what dependencies boot has downloaded?