diff options
Diffstat (limited to 'lux-lein/src/leiningen/lux/builder.clj')
-rw-r--r-- | lux-lein/src/leiningen/lux/builder.clj | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/lux-lein/src/leiningen/lux/builder.clj b/lux-lein/src/leiningen/lux/builder.clj index fe7c09750..eeb1cead7 100644 --- a/lux-lein/src/leiningen/lux/builder.clj +++ b/lux-lein/src/leiningen/lux/builder.clj @@ -1,27 +1,15 @@ (ns leiningen.lux.builder - (:require [leiningen.core.classpath :as classpath] - (leiningen.lux [utils :as &utils] + (:require (leiningen.lux [utils :as &utils] [packager :as &packager]))) (def missing-module-error "Please provide a program main module in [:lux :program]") (defn build [project] - (if-let [program-modules (get-in project [:lux :program])] - (do (when-let [jvm-module (get-in program-modules [:jvm])] - (when (&utils/run-process (&utils/compile-path project "jvm" jvm-module (get project :source-paths (list))) - nil - "[JVM COMPILATION BEGAN]" - "[JVM COMPILATION ENDED]") - (&packager/package project "jvm" jvm-module (get project :resource-paths (list))) - true)) - (when-let [js-module (get-in program-modules [:js])] - (when (&utils/run-process (&utils/compile-path project "js" js-module (get project :source-paths (list))) - nil - "[JS COMPILATION BEGAN]" - "[JS COMPILATION ENDED]") - (&packager/package project "js" js-module (get project :resource-paths (list))) - true)) - (when (not (or (get-in program-modules [:jvm]) - (get-in program-modules [:js]))) - (println missing-module-error))) + (if-let [program-module (get-in project [:lux :program])] + (when (&utils/run-process (&utils/compile-path project program-module (get project :source-paths (list))) + nil + "[COMPILATION BEGAN]" + "[COMPILATION ENDED]") + (&packager/package project program-module (get project :resource-paths (list))) + true) (println missing-module-error))) |