aj-foster

aj-foster

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).

Where Next?

Popular in Discussions Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
wmnnd
The Go vs Elixir thread got me thinking: Would it be too hard to implement a simple mechanism for creating Go-style static app binaries f...
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18595 126
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
thojanssens1
It would be nice to be able to define a redirect from one route to another from the router.ex file. E.g.: redirect "/", UserController, ...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44608 311
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement