Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deps command #497

Merged
merged 3 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions plugin/src/leiningen/cljsbuild.clj
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@
(println "REPL subcommands must be run via \"lein trampoline cljsbuild <command>\".")
(lmain/abort))))

(defn- deps
"Downloads internal `lein-cljsbuild` dependencies"
[project]
(println "Downloading cljsbuild dependencies..")
(leval/eval-in-project
(subproject/make-subproject project nil nil)
`(println "Done.")))

(defn- once
"Compile the ClojureScript project once."
[project options build-ids]
Expand Down Expand Up @@ -256,6 +264,7 @@
([project subtask & args]
(let [options (config/extract-options project)]
(case subtask
"deps" (deps project)
"once" (once project options args)
"auto" (auto project options args)
"test" (test project options args)
Expand Down
12 changes: 6 additions & 6 deletions plugin/src/leiningen/cljsbuild/subproject.clj
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@
;; the compile task, so it doesn't trigger the compile hook for all builds.
;; https://github.com/emezeske/lein-cljsbuild/issues/451
(merge (update project :prep-tasks remove-compile-task)
{:local-repo-classpath true
:dependencies (merge-dependencies deps)
:source-paths (concat
(:source-paths project)
(mapcat :source-paths builds)
[crossover-path])})
{:local-repo-classpath true
:dependencies (merge-dependencies deps)
:source-paths (concat
(:source-paths project)
(mapcat :source-paths builds)
(filter some? [crossover-path]))})
(meta project))))