Permalink
Browse files

Use leinjacker

  • Loading branch information...
1 parent 186fa8d commit 026aa2b204c95d1d0c5b34aba6812dea54a19cfd @jonase committed Apr 24, 2012
Showing with 6 additions and 23 deletions.
  1. +2 −1 project.clj
  2. +4 −22 src/leiningen/eastwood.clj
View
@@ -2,5 +2,6 @@
:description "A Clojure lint tool"
:dependencies [[analyze "0.1.6"]
[org.clojure/tools.namespace "0.1.2"]
- [org.clojars.brenton/google-diff-match-patch "0.1"]]
+ [org.clojars.brenton/google-diff-match-patch "0.1"]
+ [leinjacker "0.1.0"]]
:eval-in-leiningen true)
View
@@ -1,27 +1,9 @@
-(ns leiningen.eastwood)
-
-;; Stolen from lein-swank:
-;; https://github.com/technomancy/swank-clojure/blob/master/lein-swank/src/leiningen/swank.clj#L45
-(defn eval-in-project
- "Support eval-in-project in both Leiningen 1.x and 2.x."
- [project form init]
- (let [[eip two?] (or (try (require 'leiningen.core.eval)
- [(resolve 'leiningen.core.eval/eval-in-project)
- true]
- (catch java.io.FileNotFoundException _))
- (try (require 'leiningen.compile)
- [(resolve 'leiningen.compile/eval-in-project)]
- (catch java.io.FileNotFoundException _)))]
- (if two?
- (eip project form init)
- (eip project form nil nil init))))
+(ns leiningen.eastwood
+ (:use [leinjacker.eval-in-project :only [eval-in-project]]
+ [leinjacker.deps :only [add-if-missing]]))
(defn prepare-project [project]
- (let [project (update-in project
- [:dependencies]
- conj
- '[jonase/eastwood "0.0.3"])
-
+ (let [project (add-if-missing project '[jonase/eastwood "0.0.3"])
project (if (contains? project :source-path)
(assoc project :source-paths [(:source-path project)])
project)]

0 comments on commit 026aa2b

Please sign in to comment.