Fork me on GitHub
#emacs
<
2016-12-02
>
tianshu08:12:59

Hi, @ewen does replique support hot reload? now I have main.js and linked in my index.html. now It works when I save changes, replique/load-file then reload browser page.

ewen13:12:58

Hi @doglooksgood, replique/load-file pushes the code to the browser. You should not need to reload the page

tianshu13:12:27

@ewen Maybe I missed the correct way to open my index.html?

tianshu13:12:58

my browser open two tab, tab for replique port, the other for my index page(url is something like file:/// ...)

tianshu13:12:46

and another question, I have a core.cljs, I load this file. then I add another foo.cljs, and require foo in core.cljs. then I reload core.cljs, It seems that foo.cljs is not been loaded. I have to load it manually, is it the correct behavior?

ewen13:12:57

You only need 1 tab. The tab open on the replique port is only needed when you don't want to start a web server (in which case replique will start one for you)

ewen13:12:49

Yes you have to call replique/load-file on both file. The semantic is the same than clojure.core/load-file.

tianshu13:12:05

which folder will be served by replique? resources/ ?

ewen13:12:11

Replique serves target/cljs (by default)

ewen13:12:17

I will try to improve the documentation

tianshu14:12:03

I have done output-main-js

tianshu14:12:15

so that every time I load file, the js file updated.

tianshu14:12:04

but my index.html should move to target/cljs/index.html ?

tianshu14:12:47

If there's an example project, that will be great help

ewen16:12:19

@doglooksgood: no your index.html must stay in the assets folder of your webserver

ewen16:12:06

I will setup an example project