Fork me on GitHub
#deps-new
<
2020-09-23
>
fabrao18:09:07

Is there any doc to understand that render usage? Like ["src/{{nested-dirs}}/foo.clj" (render "foo.clj" data)]. What is {{nested-dirs}} ? I want to create a template that create clojure and clojurescript dirs and I want to see how to do it.

seancorfield18:09:24

{{foo}} is a placeholder that renders the value of the :foo key in data

seancorfield18:09:58

The library used is Stencil -- which is similar to handlebars, mustache, and many other templating libraries.

seancorfield18:09:04

The :nested-dirs key in data corresponds to the path made from the project name, e.g., myname/myproject adjusted from Clojure syntax to filesystem syntax (so - is replaced by _).

seancorfield18:09:14

So you probably want ["src/clj/{{nested-dirs}}/foo.clj" (render "foo.clj" data)] ["src/cljs/{{nested-dirs}}/bar.cljs" (render "bar.cljs" data] to seed separate clj and cljs trees?

fabrao18:09:06

ok, I got it

fabrao20:09:05

@seancorfield Thank you for your help, I could make my own first clj-new template

3