Elixir Diff — Compare Various Project Generators

Hello everyone,

I really enjoy the PhoenixDiff website for seeing changes between Phoenix versions. It makes it much easier to upgrade an existing application. This got me thinking: it might be cool to have a similar interface for comparing projects generated with different generators and flag combinations.

So, I’m pleased to introduce Elixir Diff.

When would you use this?

Example one: When we start a project at work, we don’t always know what features of Phoenix we’ll need — or if we’ll need Phoenix at all. Even if we need a web interface, sometimes it’s nice to start with mix new and add Phoenix later. This project shows us the difference between mix new --sup and mix phx.new --no-html to help us add in functionality later on.

Example two: Maybe you’re using the Nerves bootstrap generator, and you’re curious what the --no-nerves-pack flag does. This project can help.

How does it work?

As mentioned in the site’s README (see the source here), this project was an opportunity to use some good ol’ fashioned HTML, JS, and Bash. I really wanted to be able to build and host it with minimal infrastructure — in fact, everything happens on GitHub (via Actions and Pages).

With that in mind, the site is just some HTML/CSS/JS that loads git patch files. The diffs are shown using the same libraries as Phoenix Diff with some custom styling.

Now what?

That’s pretty much it. I enjoyed creating something Elixir-related even though it doesn’t use any Elixir code. The project can support additional project generators in the future if anyone is interested.

Thanks for checking it out! Feedback is always welcome (and most easily seen as a GitHub issue).

11 Likes