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 itIs it available in node_modules from the script?
it's not, does it not search vscode's internal libraries?
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
If you want to ensure a library is there, npm install it into the .joyride folder
Is there any notion of a joyride dependencies file?
package.json 😀
🙃
And we are not searching vscode’s internal libraries. That would make the scripts unnecessary dependent on vscode version, I think.
Package.json no cljs or nbb libs though right? Although many arbitrary cljs scripts wouldn't compile to nbb anyway right
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.
Yes, just package.json
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.
I wrote a minimal element of dynamically rewriting the keybindings file and registering the commands, pretty psyched about it