https://github.com/sashman/mix_file_editor
I wish mix.exs was data
https://github.com/sashman/mix_file_editor
automation dependencies elixir
Last synced: over 1 year ago
JSON representation
I wish mix.exs was data
- Host: GitHub
- URL: https://github.com/sashman/mix_file_editor
- Owner: sashman
- License: apache-2.0
- Created: 2018-07-20T16:57:07.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-07T15:05:25.000Z (almost 8 years ago)
- Last Synced: 2025-01-22T08:42:25.477Z (over 1 year ago)
- Topics: automation, dependencies, elixir
- Language: Elixir
- Size: 11.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mix_file_editor
I wish mix.exs was data
## Usage
Read deps of a mix file, can also specify a glob pattern to read multiple `mix.exs` at once.
```elixir
iex> MixFileEditor.get_deps("path/to/mix.exs")
%{
path: "path/to/mix.exs"
deps: %{
cowboy: %{value: {:cowboy, "~> 1.0"}, version: "~> 1.0"},
csv: %{value: {:csv, "~> 2.0.0"}, version: "~> 2.0.0"},
distillery: %{
value: {{:distillery, "~> 1.5", [runtime: false]}, []},
version: "~> 1.5"
},
...
}
}
iex> MixFileEditor.get_deps("path/**/mix.exs")
[
%{
path: "path/to/mix.exs"
deps: %{
cowboy: %{value: {:cowboy, "~> 1.0"}, version: "~> 1.0"},
csv: %{value: {:csv, "~> 2.0.0"}, version: "~> 2.0.0"},
distillery: %{
value: {{:distillery, "~> 1.5", [runtime: false]}, []},
version: "~> 1.5"
},
...
}
}
...]
```