You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
602 B

(ns leiningen.equilibrium
(:require [leiningen.render :as render]
[leiningen.core.main :refer [info warn]]))
(defn deploy
"Deploys the rendered page under target/page to the configured ftp target"
[project])
(defn invalid-input [project]
(warn "refer to 'lein help equilibrium' for available tasks"))
(def argmapping
{:render render/render
:deploy deploy
:? invalid-input})
(defn equilibrium
{:subtasks [#'render/render #'deploy]}
[project & args]
(let [kwarg (keyword (or (first args) "?"))
callfn (kwarg argmapping invalid-input)]
(callfn project)))