Skip to content

Instantly share code, notes, and snippets.

@city41
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save city41/e3a822fc4c2d3104443b to your computer and use it in GitHub Desktop.
Save city41/e3a822fc4c2d3104443b to your computer and use it in GitHub Desktop.
cljs :main

project.clj snippet:

:cljsbuild {:builds {:app {:source-paths ["src/cljs"]
                             :compiler {:output-to     "resources/public/js/app.js"
                                        :output-dir    "resources/public/js/out"
                                        :externs       ["react/externs/react.js"]
                                        :main my-app/core
                                        :optimizations :none
                                        :pretty-print  true}}}}

and here is what is written to app.js

document.write('<script src="resources/public/js/out/goog/base.js"></script>');
document.write('<script src="resources/public/js/out/cljs_deps.js"></script>');
document.write('<script>goog.require("my_app.core");</script>');

Problem is, my app serves the js/ directory, so it'd be nice if the script srcs where js/out/... instead of resources/public/js/out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment