Created
April 7, 2015 03:51
-
-
Save jlongster/2bdf2aca530fc5b09b90 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
(require 'cljs.repl) | |
(require 'cljs.closure) | |
(require 'cljs.repl.browser) | |
(require 'cljs.repl.node) | |
(defonce target (first *command-line-args*)) | |
(defonce action (second *command-line-args*)) | |
(defonce build (if (= action "watch") | |
cljs.closure/watch | |
cljs.closure/build)) | |
(if (= target "server") | |
(build "src/galleon_server" | |
{:main 'galleon-server.core | |
:output-to "out/main.js" | |
:target :nodejs}) | |
(build "src/galleon" | |
{:main 'galleon.core | |
:output-to "out/frontend.js"})) | |
(if (= action "repl") | |
(cljs.repl/repl (if (= target "server") | |
(cljs.repl.node/repl-env) | |
(cljs.repl.browser/repl-env)) | |
:watch "src" | |
:output-dir "out")) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment