weavejester/cljfmt

Babashka compatibility

borkdude opened this issue · 3 comments

It seems cljfmt.core is compatible with babashka:

bb -Sdeps '{:deps {cljfmt/cljfmt {:mvn/version "0.9.2"}}}' -e "(require '[cljfmt.core]) (println (cljfmt.core/reformat-string (slurp \"/tmp/dude/foo.cljs\")))"

I think with a few minor tweaks we can make the main namespace compatible too, except for the diff functionality since it relies on a Java library. If there's any interest in this, I can make a PR.

Sure, that sounds useful.

lread commented

For ongoing compatibility, do we want to add bb tests to cljfmt?
If so, I could help with that.

Yes, that might be useful. I've been considering adding some shell tests as well, since there have been a few bugs with running cljfmt via the CLI and Lein wrappers.