Hi,
I have a stand-alone project that I want to now run as a dependency. However, during mix deps.compile
I’d like the dependency to:
- Figure out it’s actually a dependency (rather than the “main” application)
- Read the “mix.exs” data from the “parent” project (i.e. the
ParentProject.MixFile
module)
Now I can do 1. by creating an alias in the dependency mix.exs
, something like:
defp aliases do
[
compile: ["compile", "run priv/magic_goes_here.exs"]
]
end
And have priv/magic_goes_here.exs
do something like:
if Path.dirname(File.cwd!()) == Mix.Project.deps_path(),
do: dependancy_logic()
What I now want to do is read the information from the “parent” project.
Any suggestions?
Thanks