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

Extend LEIN_SILENT to cljsbuild (#417) #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion plugin/src/leiningen/cljsbuild.clj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
(doseq [build-id build-ids]
(if (empty? (filter #(= (:id %) build-id) builds))
(throw (Exception. (str "Unknown build identifier: " build-id)))))
(println (if watch? "Watching for changes before compiling ClojureScript..." "Compiling ClojureScript..."))
(lmain/info (if watch? "Watching for changes before compiling ClojureScript..."
"Compiling ClojureScript..."))
; If crossover-path does not exist before eval-in-project is called,
; the files it contains won't be classloadable, for some reason.
(when (not-empty crossovers)
Expand Down
23 changes: 12 additions & 11 deletions support/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
:description "ClojureScript Autobuilder"
:url "http://github.com/emezeske/lein-cljsbuild"
:license
{:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
{:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:dependencies
[[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-2411"
:exclusions [org.apache.ant/ant]]
[fs "1.1.2"]
[clj-stacktrace "0.2.5"]]
[[org.clojure/clojure "1.5.1" :scope "provided"]
[leiningen-core "2.5.3"]
[org.clojure/clojurescript "0.0-2411"
:exclusions [org.apache.ant/ant]]
[fs "1.1.2"]
[clj-stacktrace "0.2.5"]]
:aot [cljsbuild.test]
:profiles {
:dev {
:dependencies [[midje "1.6.3"]]
:plugins [[lein-midje "3.1.3"]]}})
:dev {
:dependencies [[midje "1.6.3"]]
:plugins [[lein-midje "3.1.3"]]}})
7 changes: 4 additions & 3 deletions support/src/cljsbuild/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[clj-stacktrace.repl :only [pst+]]
[cljs.closure :only [build]])
(:require
[leiningen.core.main :as lmain]
[cljsbuild.util :as util]
[cljs.analyzer :as analyzer]
[cljs.closure :as closure]
Expand Down Expand Up @@ -34,7 +35,7 @@
(catch Throwable e
(println (red "Error running :notify-command:"))
(pst+ e))))
(println (colorizer message)))
(lmain/info (colorizer message)))

(defn ns-from-file [f]
(try
Expand All @@ -56,7 +57,7 @@
parents (butlast relative-path)
path (apply str (interpose java.io.File/separator
(cons target-dir parents)))]
(io/file (io/file path)
(io/file (io/file path)
(str (last relative-path) ".js"))))

;; Cannnot call build with ["src/cljs" "src/cljs-more"] cause build thinks a vector
Expand All @@ -69,7 +70,7 @@
(defn- compile-cljs [cljs-paths compiler-options notify-command incremental? assert? watching?]
(let [output-file (:output-to compiler-options)
output-file-dir (fs/parent output-file)]
(println (str "Compiling \"" output-file "\" from " (pr-str cljs-paths) "..."))
(lmain/info (str "Compiling \"" output-file "\" from " (pr-str cljs-paths) "..."))
(flush)
(when (not incremental?)
(fs/delete-dir (:output-dir compiler-options)))
Expand Down