View Source Uniform (Uniform v0.6.0)

Write less boilerplate and reuse more code in your portfolio of Elixir apps

With Uniform, developers maintain multiple Elixir apps inside a Base Project: a "monolith" containing every app. Before deployment, the apps are "ejected" into separate codebases containing only the code needed by each app.

The entire process is automated, so there's much less work required to start a new app or share capabilities between apps.

In order to understand and use this library, we heavily recommend reading the following guides:

The Setting up a Phoenix project guide is recommended if you're building Phoenix apps.

usage

Usage

mix uniform.eject tweeter

installation

Installation

Consult the Getting Started guide to add Uniform to an Elixir application. In summary, you'll need to:

  1. Add the dep in mix.exs
  2. Add a Blueprint module to your project
  3. Add configuration to identify the Blueprint module
  4. Add uniform.exs manifests to each Ejectable App
  5. Fill out the Blueprint so all the necessary files get ejected

Uniform ❤️ Automation

Uniform is about powering up developers by automating repetitive work.

With that in mind, we recommend using Continuous Integration (CI) tools to automate the process of committing code to ejected repos.

Link to this section Summary

Functions

Returns a list of all Ejectable App names in your Base Project.

Return a list of all Ejectable Apps in your Base Project as Uniform.App structs.

Link to this section Functions

@spec ejectable_app_names() :: [String.t()]

Returns a list of all Ejectable App names in your Base Project.

examples

Examples

$ fd uniform.exs
lib/tweeter/uniform.exs
lib/trillo/uniform.exs
lib/hatmail/uniform.exs
iex> ejectable_app_names()
["tweeter", "trillo", "hatmail"]
@spec ejectable_apps() :: [Uniform.App.t()]

Return a list of all Ejectable Apps in your Base Project as Uniform.App structs.

example

Example

$ fd uniform.exs
lib/tweeter/uniform.exs
lib/trillo/uniform.exs
lib/hatmail/uniform.exs
iex> ejectable_apps()
[
  #Uniform.App<
    extra: [...],
    name: %{camel: "Tweeter", hyphen: "tweeter", module: Tweeter, underscore: "tweeter"},
    ...
  >,
  #Uniform.App<
    extra: [...],
    name: %{camel: "Trillo", hyphen: "trillo", module: Trillo, underscore: "trillo"},
    ...
  >,
  #Uniform.App<
    extra: [...],
    name: %{camel: "Hatmail", hyphen: "hatmail", module: Hatmail, underscore: "hatmail"},
    ...
  >
]