This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-08
Channels
- # aleph (2)
- # announcements (2)
- # asami (50)
- # babashka (39)
- # beginners (17)
- # calva (61)
- # cider (9)
- # clj-kondo (5)
- # clojure (37)
- # clojure-europe (52)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (5)
- # clojurescript (28)
- # cursive (3)
- # datahike (11)
- # datomic (28)
- # deps-new (11)
- # events (3)
- # fulcro (18)
- # google-cloud (1)
- # graphql (8)
- # introduce-yourself (4)
- # jobs (2)
- # leiningen (7)
- # lsp (15)
- # pathom (9)
- # re-frame (6)
- # reagent (35)
- # reitit (17)
- # releases (1)
- # shadow-cljs (20)
- # specter (1)
- # test-check (106)
- # tools-deps (8)
- # uncomplicate (1)
- # vim (29)
Is it possible to create a new template which slightly modifies an existing template? Let's say I just want to make a few tweaks to the lib template. What's the best way to go about it?
@ben.sless I think you could have a template.edn
that specified relative paths to folders that match the built-in lib
template (since it would be on the classpath) and you could specify one or both of the two transformation functions that made the tweaks you need? Depends on what those tweaks are, I guess.
Thank you. What I want to do is override a few fields by default in the pom, add another file, add add some text in the README. I think the data-fn lets me handle the first, not sure about the rest
In theory, the template-fn would let you read some existing files, write modified versions to a temporary location, and return an updated template.edn
data structure that would point to those new temporary files. I don't know that anyone has actually tried that yet... but if you run into limitations/bugs trying to do it, create issues and I'll address them because that is supposed to work.
(side note: if you do that in the next two weeks, don't expect quick responses -- I'll be traveling and mostly off the grid, but will address them when I return... just to set expectations)
no problem. I think a slightly more general feature which could be cool is "derivative templates"
Instead of writing a template from scratch or doing back flips with temporary files, to be able to define a template as a variation on another template, sort of like immutable hash maps
Yup. That does sound like a nice enhancement. No idea how that might work (given the infrastructure on which deps-new
is built) but feel free to create an issue with some brainstorming ideas if you have them...
Nope. Waiting for folks to propose something since this isn't a problem I have so I don't know what a solution should look like.