what is really minimalstic, may not be so useful. I just create my new project, setup it up with shadow-cljs
, reagent
and deps.edn
. It took me a very long time, where is the cost?
Since I have focused on Clojure development for one year, I didn’t follow the updates of new tooling in ClojureScript world.
When I start, I first go for figwheel-main
, I add that dependency, create a minimal app.cljs.edn
, due to the version I picked, I ran into this. Then I switch to the new snapshot version and it works.
Then I think I need take a look at how to split my builds, so I go for Figwheel Code Splitting, Oh, it works. I also add a .dir-locals
to make it start easier. Then I tried an advanced build, Bang! I think it could be a bug, so failed. (I didn’t save that error messages, but when I have time, I will try to reproduce). So far I spend about one day and half.
Cause I want I can get a available version quickly, I go for shadow-cljs
, on this way, I met other problems, when you create a new file, If you evaluate the namespace(via cider repl, I am a Emacs user) before you save it, this source file will lost the relation with the target file, this namespace will not recompile until you restart shadow-cljs
. But once I knew this, It’s ok, so I am go on.
I already have a Clojure project, so I fire up two REPLs for Clojure and ClojureScript in Emacs. Then I met a problem that If the last repl buffer is a clj repl, I can’t evaluate cljs code, vice versa. So I wrote about 10 lines elisp to patching. (I’m not sure about which part is the cause yet).
Okay now everything looks like great, but it spend me nearly 3 days. I am not saying figwheel-main
, shadow-cljs
or cider
is bad, they are awesome tools and I love them. I’m just not a smart people so it cost me a lot time to put things together. But maybe for a new user, maybe he will do worse than me.
So I think a skeleton should do these well:
- Stable. Carefully pick the versions of each part, have a test on the combination to make sure it will works, using the latest after testing.
- Solutions prepared. This could be tutorials or docs, not code. User need to know how to start those basics. Most skeleton may only give dev and prod builds. this is not enough. User should know how to build, how to use clojure library, how to use javascript library, how to split modules, etc.
- Editor Integration. Like how to use it with VSC, Atom, Cursive, Emacs, etc.
- Minimal on code.