Why? Because we love Ruby and the way bundle adds / removes dependencies and we wanted to have the same for our Elixir projects. This package contains 2 mix functionalities, mix deps.add and mix deps.rm. This allows for easy dependency management.
Add both files to /lib/mix/tasks of your current project and voila. Or, you can run the following command, providing your project directory:
$ mkdir -p PROJECT_DIR/lib/mix/tasks && mv *.ex PROJECT_DIR/lib/mix/tasks
$ mix deps.add PACKAGE [--version=VERSION --git=GIT_URL]
$ mix deps.rm PACKAGE
$ mix deps.add cowboy
$ mix deps.rm cowboy
- Is this the best solution? Nope, it was cobbled together quickly, but hey, it works.
- Can it be improved? Definitely. Especially error handling.
- Can I do it? Of course, feel free to send pull requests.