This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-05
Channels
- # adventofcode (22)
- # ai (1)
- # announcements (1)
- # babashka (3)
- # beginners (8)
- # calva (8)
- # cider (17)
- # clojure (3)
- # clojure-europe (4)
- # clojure-norway (13)
- # clojurescript (20)
- # core-logic (1)
- # data-science (3)
- # datahike (6)
- # deps-new (4)
- # events (6)
- # hoplon (4)
- # hyperfiddle (4)
- # lsp (34)
- # overtone (8)
- # podcasts-discuss (2)
- # releases (3)
- # ring (5)
- # vim (10)
- # xtdb (2)
I'm looking to create a set of deps-new templates for quil. However, I'm a little confused about the what the right approach is when you have multiple templates in one repo. For quil, it will need a cljs template for p5js based sketches and a clj template for projects using processing. After looking at the deps-new source, it appears that all that is necessary is to put the appropriate template.edn manifest in the correctly named folder in resources. The "template" template appears to assume it's a single repo with one template, but I assume if I rename the directories under resources and add a new template.edn it will allow multiple just the same as deps-new? I'm curious if the recommendation is to put the templates in their own repo, or if it's fine to embed those templates in the main quil project? Finally, I'm also looking for examples or best practices for if the cljs template needs to be further subdivided to handle using figwheel/shadowjs/clojurescript. Should that be a complete template for each project type, or is there a good example somewhere using commandline flags at creation to significantly adjust the output type, or is the recommendation just to create a tempalte for each and then perhaps share some common files? Ie should I make templates sketchbook-{clj, cljs-figwheel, cljs-shadow, cljs} or just sketchbook-{clj,cljs} and add figwheel/shadow as a commandline flag somehow? Thanks in advance for any help or suggestions!
This is a really good example of multiple templates in a single repo: https://github.com/practicalli/project-templates/tree/main As for cljs, someone else will need to answer that as I do not use it. Maybe one day...
@UMGAMGWF8 happy to help create the quil templates if required. For Practicalli, I created separate templates and then looked for commonality between them to increase reuse of files. I usually found common aspects when creating additional templates I created separate files for variants and pass command line arguments to select those variant fikes (arguments can also be used in an alias) Another approach would be to use clj-rewrite to update base files, or use a template library like selmer to add variant code. I haven't felt the need to take this approach as yet though.
Thanks, I will take a look at those examples and try to work through an example template for quil-cljs.