Skip to content

Instantly share code, notes, and snippets.

@jlongster
Created April 7, 2015 03:51
Show Gist options
  • Save jlongster/2bdf2aca530fc5b09b90 to your computer and use it in GitHub Desktop.
Save jlongster/2bdf2aca530fc5b09b90 to your computer and use it in GitHub Desktop.
(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