Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

simplified the plugin

  • Loading branch information...
commit 14231f2dddd8c8f5649243e397d0867d54168b94 1 parent 026aa2b
@jonase authored
Showing with 5 additions and 13 deletions.
  1. +5 −13 src/leiningen/eastwood.clj
18 src/leiningen/eastwood.clj
@@ -2,24 +2,16 @@
(:use [leinjacker.eval-in-project :only [eval-in-project]]
[leinjacker.deps :only [add-if-missing]]))
-(defn prepare-project [project]
- (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)]
- project))
(defn eastwood
([project] (eastwood project "{}"))
([project opts]
- (let [project (prepare-project project)
- opts (read-string opts)
- opts (if (contains? opts :source-paths)
- opts
- (assoc opts :source-paths (:source-paths project)))
+ (let [opts (read-string opts)
+ opts (assoc opts :source-paths (or (:source-paths opts)
+ (:source-paths project)
+ [(:source-path project)]))
global-opts (:eastwood project)
opts (merge global-opts opts)]
- (eval-in-project project
+ (eval-in-project (add-if-missing project '[jonase/eastwood "0.0.3"])
`(eastwood.core/run-eastwood '~opts)
'(require 'eastwood.core)))))
Please sign in to comment.
Something went wrong with that request. Please try again.