blob: 9b8e1759be7fb5035d78b9de7aa5383765ac1268 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
;; This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
;; If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
(ns leiningen.lux.builder
(:require (leiningen.lux
[utils :as &utils]
[packager :as &packager])))
(defn build [project]
(if-let [[program-module program-definition] (get-in project [:lux :program])]
(let [command (&utils/compile-path project program-module program-definition (get project :source-paths (list)))]
(when (time (&utils/run-process command
nil
"[COMPILATION BEGAN]"
"[COMPILATION ENDED]"))
(time (&packager/package project program-module (get project :resource-paths (list))))
true))
(println "Please provide a program main module in [:lux :program]")))
|