joyride

2023-08-23T05:33:08.334469Z

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.

2023-08-23T05:33:22.730389Z

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

2023-08-23T05:39:05.856129Z

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

2023-08-23T05:53:38.485399Z

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

pez 2023-08-23T06:54:48.920049Z

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.

pez 2023-08-23T06:58:08.947699Z

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.

2023-08-23T06:36:57.201199Z

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

pez 2023-08-23T06:59:58.514779Z

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.