Logo LightLogo Dark

Hex version badgeHexdocs badge

Fireside

Fireside is a small Elixir library that allows importing code components (templates) into an existing Elixir project together with their dependencies. It also allows upgrading these components if they have a newer version available.

Installation

def deps do
  [
    {:fireside, "~> 0.1", only: :dev, runtime: false}
  ]
end

Use cases

Usage

To see supported Fireside tasks, refer to Mix Tasks.

Upgrading code components with Fireside

Fireside supports two modes of installing a code component (template): locked and unlocked. If you are installing a code component in the "unlocked" mode, it will just install the code and forget about it. If you are installing it in the "locked" mode (default), it will compute the hash of its AST, annotate each generated file as "DO NOT EDIT", and record the hash in config/fireside.exs. Later, when updating to a newer version, Fireside will know which files belong to which component and whether they have been mistakenly modified.

Example Fireside component

To see an example Fireside component, check out Shopifex, a component that provides the backbone for an e-commerce online store.