Fork me on GitHub

so I want to make a cljsjs package for, but there's no single file to build externs from, unlike react-bootstrap, which has the project. when I try to build material-ui using webpack, it bakes react into the compiled JS, which is not what I want at all. any ideas?


whoops, will take this to #C03S1L9DN


@magnars: For Episode 01, I'm having a bit of a problem with reloaded.repl... I'm fairly sure I did everything like you did, but I'm not getting reloading on save; i.e. when I change the app handler and save the file, then reload the page, the old handler will still be executed. Is there some key combo that triggers reloading manually here?


@chipf0rk: are you calling (reset) in the repl? I think that the figwheel autobuild watches the filesystem for changes while the server side requires a manual invocation to refresh the system


no, and i'm not even at figwheel yet :)


it wasn't (visibly) called in the video at that point, that's what got me confused


do I have to?


I think so, I’m working through potd myself in my copious spare time, gimme a minute to set up a clean project and I’ll let you know simple_smile


cool, thanks!


also @magnars++ for creating a thing that has finally managed to make grok a reloaded + figwheel workflow


@chipf0rk @chris_johnson: (reset) will certainly take care of things. But since your application is running in the same REPL as your CIDER session, you can push changes with C-c C-k which evaluates the buffer. C-c C-x will refresh all changed files. I did notice however, that I often don't even have to do that, and the changes will be immediately apparent with no intervention from me. I have no explanation for that phenomenon however.


Come to think of it - maybe clj-refactor evaluates my code when it parses the AST? That might be an explanation actually.


cool, thank you :)


Guess I'm really used to Figwheel, it's so straightforward... Clojure reloadable tooling seems to lack in comparison


automatic reloading of backend code might lead to unwanted side-effects if you're not careful (launch-the-missiles), so I guess that's one reason .


so maybe I should try to figure out why my code is being reloaded automatically at times before something bad happens 😄


but so could frontend code, by calling (create-new-missile) that talks to the API :D


I mean it's mostly dev tooling anyways, I'd like it if it worked similarly for Clojure


But I guess I can think of some challenges to implement it like that


it's fairly straight-forward to implement in Emacs


Not having "clients" connected through WebSockets that you can push to etc. Maybe there's stuff that works like Figwheel but I just haven't found it yet. I'm also much more of a JS than a Java guy, so I probably don't fully get it 😉


I think I've had something before but people warned of its usage in the comments. I got scared I guess


With Emacs, I mean :)


(add-hook 'before-save-hook 'cider-load-buffer t t) would enable it for a single buffer, and that could be added to cider-mode-hook. Should probably add a check that you're in a .clj file.


I might try that next time, thank you!