-
Notifications
You must be signed in to change notification settings - Fork 99
V0.9 #160
Conversation
This is already looking a pretty decent. I'm gonna push this out soon as 0.9.0-SNAPSHOT so folks can try it out. I think this will be mostly the scope for 0.9. |
I've started a new app with this version of Chestnut to get a better feel for it. Some things I've noticed
|
Doing a heroku create / git push heroku still works out of the box, so that's great. But, you have to acess |
Now that Figwheel is more full featured we can drastically simplify things. - No more Weasel, just nREPL + Figwheel-sidecar - No longer two web servers in dev mode, just figwheel on 3449 with our http handler - Drop the double figwheel config, figwheel-sidecar.repl-api will pull it out of project.clj - Rename dev to server-impl, I think this makes more sense In project.clj instead of having lots of stuff inside the :dev profile, move more of it to the top level, and just override what needs overriding in the :uberjar profile. This also helps with figwheel's repl-api, because that one reads project.clj but without profile merging.
index.html no longer needs pre-processing in dev mode, we can serve it up statically, so it can go straight into public/.
Various tweaks and cleanup in project.clj, including bringing the cljsbuild and figwheel config up to current standard.
Before we had development helper functions like (run) and (browser-repl) inside the {{project-ns}}.server namespace, and we would start the repl with that as the default namespace, so they were available. In prod mode we don't want to include figwheel though, and there are potentially other small differences, so we had a separate source directory for dev and prod, so you could implement a namespace twice, once for each env. The newer setup is simpler, we add our convenience functions to `user`, and start the repl in `user` the way it does by default. The good thing about this is you have the default clojure repl functions like doc and source available as well. This dramatically simplifies the directory layout.
In a production setup you would more typically let your static assets be served up by a separate server like nginx, and let that one handle caching headers.
Adding clojure.java.shell in :require for sass and less
This prevents warnings when using clj-jgit.
so it is on the class path
These are good defaults to have so you know when to add type annotations.
I think I've addressed the main issues. I would like to push this out as a new release this week. I added a couple more niceties like http request/response logging, and enabling of reflection warnings. I've also added a |
One thing I noticed which seems to be a figwheel bug: when you configure a server log path for figwheel, it only uses it for the cljs stuff, CSS reloading still causes it to log to the default location. |
For CLJS testing we switch to doo, this allows us to drop a lot of boilerplate. Get rid of the --speclj option, let's do one thing and do it well.
Introducing this extra level of indirections means that when the server implementation (e.g. the routes) changes, and ring.reload reloads it, figwheel actually uses the new definition.
This is the first big update in a while, and should bring Chestnut bing on par with current state of the art.
Now that Figwheel is more full featured we can drastically simplify things.
Drop Weasel and instead use the setup described here: https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
The cool thing is we can still have the same public facing API :
lein repl
/(run)
/(browser-repl)
.In project.clj instead of having lots of stuff inside the :dev profile, move
more of it to the top level, and just override what needs overriding in the
:uberjar profile. This also helps with figwheel's repl-api, because that one
reads project.clj but without profile merging.
TODOS