greetings!
is there a way to access js var foo
from js module(?) which does not export it?
specifically https://github.com/paulrosen/abcjs/blob/master/src/write/abc_glyphs.js#L21
(:require ["abcjs/src/write/abc_glyphs"]); :refer [glyphs]]
exposes only 1 top-level var:
module.exports = Glyphs;
https://github.com/paulrosen/abcjs/blob/master/src/write/abc_glyphs.js#L234I tried every combination from table in https://shadow-cljs.github.io/docs/UsersGuide.html#_using_npm_packages with no success
which var
do you want to access? in general you cannot access var
unless it is part of some exported object
1st link:
var glyphs =
nope can't get that
thank you
For some reason when I change my code the the code in the browser doesn't update.... :thinking_face:
I can see the reload image, but the DOM doesn't change. I only have a inti
function.
https://code.thheller.com/blog/shadow-cljs/2019/08/25/hot-reload-in-clojurescript.html
like missing a ^:dev/after-load
tagged function to do the actual re-render
that did the trick, thank you @thheller. I didn't see that in any of the examples though I looked at. I must have missed something.
maybe they have the old style :after-load
in the build config https://shadow-cljs.github.io/docs/UsersGuide.html#_hot_code_reload
@thheller What version did hot-reload change? I have a problem with watching telling me the code is stale even if it compiles from scratch. I have a :devtools :after-load function, and nothing is tagged with ^:dev/after-load in my code. I recently upgraded to the newest shadow-cljs.
it didn't change. both versions work.
@thheller I had tried to downgrade and still have the same problem with stale output. Thanks anyways. Any pointers on troubleshooting shadow-cljs processes to find my issue? Still new to clojure and not sure how to find my issue. It seemed to start happening when I upgraded several libs but I have gone back to my last working commit and still shadow tells me I have stale output, even when I completely clear all caches, and see it compile everything from scratch. I also rebooted my laptop just in case there was a process running headless or detached.
@michael819 there isn't much to it. I assure you that you not loading the correct output if you get stale output warnings.
make sure all your paths are exactly like you expect them
I mean just delete the output files you think you are working with and reload the page
if that doesn't give you 404s then you need to track down the files you are actually loading
@thheller is there a way to update closure library to a newer version?
I guess you can kinda make your own release?
shadow-cljs is just using the CLJS-released version which has no new release
yeah looks to be a year out of date so far
yeah its not updated very frequently