joyride

zimablue 2023-02-12T12:57:53.796319Z

my js/require is failing but I'm not sure what I'm doing wrong, trying to do this:

(def strip-json (js/require "strip-json-comments"))
it's a library included in .vscode-server/bin, was trying to use it to strip comments from config json files in presumably the same way vscode does it

pez 2023-02-12T13:02:50.196749Z

Is it available in node_modules from the script?

zimablue 2023-02-12T13:14:35.605819Z

it's not, does it not search vscode's internal libraries?

borkdude 2023-02-12T14:15:35.171999Z

Just use ‘require’ instead of js/require, it brings you the same feature and in a next version js/require won’t be supported anymore

borkdude 2023-02-12T14:16:01.106679Z

If you want to ensure a library is there, npm install it into the .joyride folder

zimablue 2023-02-12T14:27:25.707149Z

Is there any notion of a joyride dependencies file?

pez 2023-02-12T14:28:02.961299Z

package.json 😀

zimablue 2023-02-12T14:28:18.352549Z

🙃

pez 2023-02-12T14:29:44.123879Z

And we are not searching vscode’s internal libraries. That would make the scripts unnecessary dependent on vscode version, I think.

zimablue 2023-02-12T14:37:21.203959Z

Package.json no cljs or nbb libs though right? Although many arbitrary cljs scripts wouldn't compile to nbb anyway right

pez 2023-02-12T14:46:32.937959Z

We haven't gotten to CLJS dependency management yet. You'll need to copy their source code. And they can't depend on something that Joyride does not provide built-in. See https://github.com/BetterThanTomorrow/joyride/blob/master/doc/api.md#clojurescript-namespaces You are welcome to help bring in built-in libraries that you miss.

borkdude 2023-02-12T14:56:05.888089Z

Yes, just package.json

pez 2023-02-12T15:09:06.081479Z

Generally I think npm often has libraries for many tasks. It's when it gets Clojure specific that it gets extra important to reach the Clojure eco system. We are adding rewrite-clj in next Joyride, for instance. I will probably release that today.

pez 2023-02-12T15:35:56.850689Z

zimablue 2023-02-12T18:53:10.331279Z

I wrote a minimal element of dynamically rewriting the keybindings file and registering the commands, pretty psyched about it

2
1
🎉 2