View Source mix guard (ExGuard v1.6.1)

ExGuard automates various tasks by running custom rules whenever file or directories are modified.

Usage

usage: mix guard [--config=.exguard.exs]
help: mix help guard

Installation

add ex_guard to mix.exs

def deps do
  [{:ex_guard, "~> 1.6.1", only: :dev}]
end

Sample config file

Create .exguard.exs in your root mix directory:

use ExGuard.Config

guard("unit-test")
|> command("mix test --color")
#config that match specific files:
|> watch({~r{lib/(?<dir>.+)/(?<file>.+).ex$}, fn(m) -> "test/#{m["dir"]}/#{m["file"]}_test.exs" end})
#if a file doesn't match with above pattern, this below pattern will be tested and applied
|> watch(~r{\\.(erl|ex|exs|eex|xrl|yrl)\\z}i)
|> ignore(~r/priv/)

Run mix guard and happy coding.

Check out here for more fine-grained configs.

Notifications

Notify the result of execution through:

Summary

Functions