I am using Sourceror
library to create a new mix.exs
file for my project, but I have problem to create a tuple I want. It is very hard to create a pattern.
defp dep(name, version, dep_line, other_options) do
{:__block__, [line: dep_line],
[
{
name,
{:__block__, [line: dep_line, delimiter: "\""], ["~> " <> version}
}
]
}
end
Imaging you have this function to create something like this, based on: sourceror/add_dependency.exs at main · doorgan/sourceror · GitHub
{:phoenix_html, "~> 3.0"}
So if I have something like this? What shall I do?
{:phoenix_html, "~> 1.2", only: :dev, test: :runtime}
This is the file I am working on it: mishka_installer/mix_creator.ex at master · mishka-group/mishka_installer · GitHub
Thank you