Hi everyone,
I'm quite new to Clojure/Script and Quil, and have been having a slight problem with the project structure.
I prefer using CLJS for Quil experiments (mostly because of Figwheel hot reloading). While learning, you really want to just have a library of sketches that you can refer to, and easily re-run. I noticed that it's fairly easy to do in Clojure Quil (best example is the
Quil examples themselves). A simple
at the end of the sketch file does the trick. Then you can just lein run -m <sketch file>, or (require ...) straight in the REPL.
I've been looking for a way of doing the same with CLJS, and have not really found one yet. I know that in the project.clj, :cljsbuild specifies the main function, so that would probably have to change depending on what sketch will need to be run. Or would I need to have some require logic in the project's core.cljs?
I also saw Nikita's answers to a very similar questions in the much-earlier
Using Quil as a library, instance many sketches thread, however I couldn't really adapt it to make it work.
My desired workflow: having a folder full of different sketches (just like in quil-examples), and being able to either just load whichever one I want via C-C C-k, or require'ing the ns in the REPL, or something similar.
Any help is much appreciated.
Cheers,
Greg