Home

Awesome

Lein-Auto

A Leiningen plugin that watches the project source directories, and executes a task when it detects changes to files matching a set pattern.

Installation

Add lein-auto as a plugin dependency to your project or profiles.

:plugins [[lein-auto "0.1.3"]]

Usage

Add auto to the beginning of any command you want to be executed when file changes are detected. For example:

lein auto test

This will run lein test every time it detects a change to a file. You can stop it running with Ctrl-C.

By default only .clj, .cljs, cljx and .cljc files are watched. You can change this by adding some extra configuration to your project file:

:auto {:default {:file-pattern #"\.(clj|cljs|cljx|cljc|edn)$"}

The :default key will apply this option to all tasks, but you can also apply options to a specific task:

:auto {"test" {:file-pattern #"\.(clj|cljs|cljx|cljc|edn)$"}

There are currently four options available:

License

Copyright © 2016 James Reeves

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.