I have a polylith project that is a cli. Is there a way to run this specific project using clj ? I know that I can add an alias to the top level deps and reference the base, but I wasn't sure if there was a built-in polylith way to do that.
I know I can create a jar file and run it that way, but I was thinking that this would be easier for spot-checking things quickly.
(cd projects/my-cli && clj -M -m ...) perhaps? 🙂
That said, I mostly set up projects to run from the top-level using an alias with :extra-deps {poly/my-cli {:local/root "projects/my-cli"}} and :main-opts for the -m portion.
You want your top-level alias to reference the project, not the base BTW, since the base would not have any dependencies on bricks -- only projects have those.
This is what I came up with.
:migrations {:main-opts ["-m" "polydoc.migrations-cli.core"]
:extra-deps {poly/polydoc-migrations {:local/root "projects/polydoc-migrations"}}}}}
Does this seem reasonable?That's the alias for the project in the top level deps file.
Yup. That's pretty much what we do at work.
Cool. I'm learning.
I took your advice by the way. I'm incorporating migratus and building a little cli to handle db migrations.