AbstractMachinesLab / mix_caramel

:candy: A Mix plugin to use Caramel
Apache License 2.0
17 stars 4 forks source link

mix_caramel

Drop-in plugin to start writing Caramel code in your Elixir projects.

Features

λ mix compile
==> mix_caramel
Compiling 1 file (.ex)
📦 Installing Caramel v0.1.1...
🍬 Using Caramel v0.1.1
Compiling todo.erl      OK

==> hello_world
Compiling 1 file (.erl)
Compiling 14 files (.ex)
λ mix caramel

Available tasks:

mix caramel.check # Type-check all Caramel modules in this project
mix caramel.fmt   # Format all Caramel files in this project
λ mix caramel.check
Compiling todo.erl      OK

λ mix caramel.fmt
💅🏽 formatted 1 files (.ml, .mli, .re, .rei)

Installation

The package can be added to your project through the dependency list in mix.exs, and you need to tell it what version of Caramel you want to run and where to look for the Caramel sources.

def deps do
  [{:mix_caramel, git: "https://github.com/AbstractMachinesLab/mix_caramel", branch: :main}]
end

def project do
  [
    app: :test_project,
    version: "0.1.0",
    elixir: "~> 1.11",
    start_permanent: Mix.env() == :prod,
    deps: deps(),
    compilers: [:caramel] ++ Mix.compilers(),
    caramel_paths: ["src"],
    caramel_release: "v0.1.1"
  ]
end