joyride 2023-08-23

Hi. I define some functions in "util.js", and in another file "a.js", I "require "util.js". The functions in "util.js" has the "export" keyword in the function declaration.

However, I got: joyride ERROR: Run Failed: Unexpected token 'export

Got it. Switching to "module.exports = {}" syntax now works.

Another question, using javascript, how can I log to the output channel of joyride?

I don’t know, tbh. We don’t have a JS API for importing CLJS things. Something for me an @borkdude to consider, I guess.

I guess you can try to export an init function/method to your JS module and call it from the CLJS script that requires the module. Passing in the things you want to interact with.

One more question, how can I force reload the util.js file?

If you have :reload on the require of it, it should force reload when you require. So evaluating that in the REPL should do it.