aboutsummaryrefslogtreecommitdiff
path: root/lux-lein/src/leiningen/lux/builder.clj
diff options
context:
space:
mode:
Diffstat (limited to 'lux-lein/src/leiningen/lux/builder.clj')
-rw-r--r--lux-lein/src/leiningen/lux/builder.clj31
1 files changed, 18 insertions, 13 deletions
diff --git a/lux-lein/src/leiningen/lux/builder.clj b/lux-lein/src/leiningen/lux/builder.clj
index 65f45b90c..a23d05a0e 100644
--- a/lux-lein/src/leiningen/lux/builder.clj
+++ b/lux-lein/src/leiningen/lux/builder.clj
@@ -3,18 +3,23 @@
(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
- "[BUILD BEGIN]"
- "[BUILD END]")
- (&packager/package project "jvm" jvm-module (get project :resource-paths (list)))))
- (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
- "[BUILD BEGIN]"
- "[BUILD END]")
- (&packager/package project "js" js-module (get project :resource-paths (list))))))
- (println "Please provide a program main module in [:lux :program]")))
+ (when (not (or (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
+ "[BUILD BEGIN]"
+ "[BUILD END]")
+ (&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
+ "[BUILD BEGIN]"
+ "[BUILD END]")
+ (&packager/package project "js" js-module (get project :resource-paths (list)))
+ true))))
+ (println missing-module-error))
+ (println missing-module-error)))