Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
578f3f5
commit 803f7aa
Showing
6 changed files
with
97 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
(defproject polylith/lein-polylith "0.1-SNAPSHOT" | ||
:description "Polylith, a component based architecture" | ||
:url "https://github.com/tengstrand/polylith" | ||
:dependencies [[selmer "1.11.3"]] | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html"} | ||
:eval-in-leiningen true) | ||
:description "Polylith, a component based architecture" | ||
:url "https://github.com/tengstrand/polylith" | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html"} | ||
:eval-in-leiningen true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
(ns leiningen.polylith | ||
(:require [leiningen.polylith.cmd :as cmd])) | ||
|
||
(defn- print-missing-root-dir [] | ||
(println "Root directory must be set in the project.clj file, e.g.:") | ||
(println " {:polylith {:root-dir \"/Users/joakimtengstrand/projects/myproject\"")) | ||
|
||
(defn ^:no-project-needed polylith | ||
{:help-arglists '([cmd/gen-deps | ||
cmd/build-git | ||
cmd/deps]) | ||
:subtasks [#'cmd/gen-deps | ||
#'cmd/build-git | ||
#'cmd/deps]} | ||
{:help-arglists '([cmd/components | ||
cmd/deps | ||
cmd/gen-deps | ||
cmd/git-changes | ||
cmd/help | ||
cmd/project-settings]) | ||
:subtasks [#'cmd/components | ||
#'cmd/gen-deps | ||
#'cmd/git-changes | ||
#'cmd/help | ||
#'cmd/deps | ||
#'cmd/project-settings]} | ||
([project] | ||
(println "The Polylith architecture: https://github.com/tengstrand/polylith") | ||
(println) | ||
(println " lein polylith a where a is:") | ||
(println) | ||
(println " deps Prints all dependencies.") | ||
(println " gen-deps Generate dependency files") | ||
(println " build-git")) | ||
(cmd/help)) | ||
([project subtask & args] | ||
(case subtask | ||
"gen-deps" (cmd/gen-deps) | ||
"build-git" (cmd/build-git args) | ||
"deps" (cmd/deps) | ||
(cmd/task-not-found subtask)))) | ||
(let [settings (:polylith project) | ||
root-dir (:root-dir settings)] | ||
(if (nil? root-dir) | ||
(print-missing-root-dir) | ||
(case subtask | ||
"components" (cmd/components root-dir) | ||
"deps" (cmd/deps) | ||
"gen-deps" (cmd/gen-deps) | ||
"git-changes" (cmd/git-changes root-dir args) | ||
"help" (cmd/help) | ||
"settings" (cmd/project-settings settings) | ||
(cmd/task-not-found subtask)))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters