Created
November 25, 2011 05:40
-
-
Save anonymous/1392881 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; buildjs.clj | |
(require '[cljs.closure :as cljsc]) | |
(def src-folder "<a folder with *.cljs files>") | |
(def out-folder "<an output folder path>") | |
(defn buildjs [file optimizations] | |
(cljsc/build (str src-folder file ".cljs") | |
{:optimizations optimizations | |
;; a good explanation of externs is here: http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html | |
;; :externs ["<path to externs file>"] | |
:output-dir out-folder | |
:output-to (str out-folder file ".js")})) | |
;; optimization may be :advanced, :whitespace and :simple | |
(buildjs "script" :simple) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment