• (compile project)
  • (compile project & namespaces)
Ahead-of-time compile the namespaces given under :aot in project.clj or
those given as command-line arguments.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source leiningen/compile.clj:135 top

(defn compile
  "Ahead-of-time compile the namespaces given under :aot in project.clj or
  those given as command-line arguments."
  ([project]
     (.mkdir (file (:compile-path project)))
     (if (seq (compilable-namespaces project))
       (if-let [namespaces (seq (stale-namespaces project))]
         (eval-in-project project
                          `(doseq [namespace# '~namespaces]
                             (when-not ~*silently*
                               (println "Compiling" namespace#))
                             (clojure.core/compile namespace#))
                          nil :skip-auto-compile)
         (when-not *silently*
           (println "All namespaces already :aot compiled.")))
       (when-not *silently*
         (println "No namespaces to :aot compile listed in project.clj."))))
  ([project & namespaces]
     (compile (assoc project
                :aot (if (= namespaces [":all"])
                       :all
                       (map symbol namespaces))))))
Vars in leiningen.compile/compile: = assoc compile defn if-let map println seq symbol when-not apply concat doseq list vector
Used in 0 other vars

Comments top

No comments for compile. Log in to add a comment.