@allandaviesza wrote some code to rename all the namespaces. Not sure how portable it is, but he can comment.
Hi, I'm new to both, deps.edn and polylith. I wonder how a component
can/should be standalone in terms of a config.edn
. I like to use
(io/resource "config.edn")
whereby "config.edn"
is placed in the
components resources folder. This folder is attached to the workspace
deps.edn
:dev
extra-path
as suggested. However, "config.edn"
can not be accessed by the io/resource
function. I've seen that
all(?) resources folders of the real-world-example are empty. Is it a
bad idea to provide separate configuration files for each component as
resources? Many thanks in advance.
Hi @wactbprot. The RealWorld example app doesn’t show how to use resources, but the Polylith codebase itself does, so let’s use that code as an example. The https://github.com/polyfy/polylith/tree/master/components/creator component in the Polylith project has a logo.png
image in its https://github.com/polyfy/polylith/tree/master/components/creator/resources/creator directory, and https://github.com/polyfy/polylith/blob/76936c752fb5b729c216b23d92c8a8d71cfdc92f/components/creator/src/polylith/clj/core/creator/workspace.clj#L78 you can see how it’s used from the workspace
namespace within the component. Then the resources directory of this component is included in the development’s deps.edn
file https://github.com/polyfy/polylith/blob/76936c752fb5b729c216b23d92c8a8d71cfdc92f/deps.edn#L26, and it’s also included in the deps.edn
files for all other projects, like the poly
project https://github.com/polyfy/polylith/blob/76936c752fb5b729c216b23d92c8a8d71cfdc92f/projects/poly/deps.edn#L5. Hope this can be of some help.
Jup, works! Thank you @tengstrand and many greetings to the fantastic polylith team from Berlin!
Great! 🙂 And by the way, the members of the Polylith team live in Stockholm, Sweden (or close to it)!
I tried to send greetings to the team from Berlin to Stockholm (seems I am a grammar noob too) 😅
Ahh, cool, thanks for the greetings! 😃