Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Assoc marginalia dependency into project in eval-in-project call.

  • Loading branch information...
1 parent 689a1be commit 16641938492c83904057969ead64c60a5441cee3 @technomancy technomancy committed
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/leiningen/marg.clj
11 src/leiningen/marg.clj
@@ -14,10 +14,19 @@
(eip project form init)
(eip project form nil nil init))))
+(def dep ['marginalia "0.7.0"])
+(defn- add-marg-dep [project]
+ ;; Leiningen 2 is a bit smarter about only conjing it in if it
+ ;; doesn't already exist and warning the user.
+ (if-let [conj-dependency (resolve 'leiningen.core.project/conj-dependency)]
+ (conj-dependency project dep)
+ (update-in project [:dependencies] conj dep)))
(defn marg
"Run Marginalia against your project source files."
[project & args]
- (eval-in-project project
+ (eval-in-project (add-marg-dep project)
`(binding [marginalia.html/*resources* ""]
(marginalia.core/run-marginalia (list ~@args)))
'(require 'marginalia.core)))

0 comments on commit 1664193

Please sign in to comment.
Something went wrong with that request. Please try again.