Skip to content

Commit

Permalink
Make eval-in-project use parent project dependencies.
Browse files Browse the repository at this point in the history
Fixes #23.
  • Loading branch information
emezeske committed Feb 2, 2012
1 parent c3d0bab commit c6ddde1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/leiningen/cljsbuild.clj
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,21 @@
(assoc-in {} dest value)))))
(keys relocations)))

(defn- merge-dependencies [project-dependencies]
(let [project (into {} project-dependencies)
cljsbuild (into {} cljsbuild-dependencies)]
(map vec
(merge project cljsbuild))))

(defn- run-local-project [project option-seq form]
(lcompile/eval-in-project
{:local-repo-classpath true
:source-path (:source-path project)
:extra-classpath-dirs (concat
(:extra-classpath-dirs project)
(map :source-path option-seq))
:dependencies cljsbuild-dependencies}
:dependencies (merge-dependencies (:dependencies project))
:dev-dependencies (:dev-dependencies project)}
form
nil
nil
Expand Down Expand Up @@ -195,4 +202,4 @@ Usage: lein cljsbuild [once|auto|clean]

(hooke/add-hook #'lcompile/compile compile-hook)
(hooke/add-hook #'lclean/clean clean-hook)
(hooke/add-hook #'ljar/write-jar jar-hook)
(hooke/add-hook #'ljar/write-jar jar-hook)

0 comments on commit c6ddde1

Please sign in to comment.