![]() ![]() See my next blog for more detail or clone the repo hereīlog to follow, how to add cljs tests without polluting the uberjar build. I then define helper functions in the user.clj to allow me to start, restart and stop the server using Stuart Sierra’s component reload workflow. By writing a shell script you can click on errors in the heads up display and they will open in your editor Descriptive Errors with Code Context Figwheel provides descriptive compiler errors that point to where the error is in your code. I am using an exported ‘main’ function in a different (core) namespace to start the server but you can see the ‘addEventListener code bootstrapping the server in the script tag in home-page. Figwheel has a non-intrusive heads up display that gives you feedback on how well your project is compiling. I'm using Jetty Adapter and Stuart Sierra's components. (POST "/echo/:echo" (str echo " has been to the server and back.")) :output-dir "target/cljsbuild/public/js/compiled/out" :output-to "target/cljsbuild/public/js/compiled/blogcljsfigwheel.js" (defproject blogcljsfigwheel "0.1.0-SNAPSHOT" ![]() I wanted one place to configure the common parts of the cljsbuild so I started by adding an ‘app’ build. What follows is a guide to how I accomplished this although I am sure there are other approaches. However, I have struggled with configuring the profile.clj file to share some cljsbuild parameters across profiles but still inject figwheel into the build for development only using this new approach. You would then start Figwheel using the lein figwheel plugin, which would then allow your favourite editor to connect to Figwheel using nREPL. In the past the approved way to connect to the Figwheel REPL using nREPL was to add :nrepl-port configuration parameter to your project.clj. Over the last few weeks I’ve been trying to work out how to build a Clojurescript client and make sure test code is not included in the production build and that Figwheel is included only in the dev build. This blog is actually more of a collection of notes to myself for how to configure Leiningen to build a Clojure server and Clojurescript client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |