Skip to content

Instantly share code, notes, and snippets.

View AaronJamesKing's full-sized avatar

Aaron King AaronJamesKing

  • Grand Rapids, MI
View GitHub Profile
@AaronJamesKing
AaronJamesKing / mixfile_helpers.ex
Created September 23, 2018 21:14
Mixfile helpers
unless Code.ensure_compiled? MyApp.MixfileHelpers do
defmodule MyApp.MixfileHelpers do
@moduledoc """
Defines functions to be shared by individual Mixfiles inside the umbrella project.
Since Mixfiles in an umbrella project often need to stay coordinated, this module has been introduced as a single source of truth.
This module should only be used for configuration that must be shared across applications. If configuration is only incidentally similar across Mixfiles, it should not be defined here.
In order to use these helper functions, run `Code.load_file("path/to/this/module.ex")` inside of a `mix.exs` file. This module's definition is wrapped inside a condition so that it won't be redefined when loaded multiple times.