Closed teodorlu closed 5 months ago
sounds good. maybe also add a test for it? I assumed such a test was already there
Yes, good idea.
After merging #225, this is the is the current behavior:
$ neil-dev add test && neil-dev add build && neil-dev add nrepl && neil-dev add kaocha
If you wish to create a `bin/kaocha` file, copy and run the following:
mkdir -p bin && \
echo '#!/usr/bin/env bash
clojure -M:kaocha "$@"' > bin/kaocha && \
chmod +x bin/kaocha
$ cat deps.edn
{:deps {}
:aliases {:test {:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.0"
:git/sha "b3fd0d2"}}
:main-opts ["-m" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test}
:build {:deps {io.github.clojure/tools.build {:git/tag "v0.10.3"
:git/sha "15ead66"}
slipset/deps-deploy {:mvn/version "0.2.2"}}
:ns-default build}
:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "1.1.2"}
cider/cider-nrepl {:mvn/version "0.49.0"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
:main-opts ["-m" "nrepl.cmdline" "--interactive" "--color" "--middleware" "[cider.nrepl/cider-middleware,refactor-nrepl.middleware/wrap-refactor]"]}
:kaocha {:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}
:main-opts ["-m" "kaocha.runner"]}}}
I think the :main-opts
line is a bit long, but I don't have any ideas on how to make it nicer. Perhaps the user may just edit the formatting if they don't like it later.
Yeah, good enough
Problem
After merging #216 (which I wrote), certain aliases produce some super long lines, for example
neil add build
.Proposed solution:
An alias is a map. If the alias map values themselves are maps, print them on separate lines.
Making this change, should produce the following deps.edn:
, where
io.github.clojure/tools.build
andslipset/deps-deploy
are on their own lines.