Fork me on GitHub
#tools-deps
<
2019-12-21
>
practicalli-johnny18:12:48

Is it possible to create a project structure as follows with clj-new or any similar tools. Is it just a matter of creating my own template? Or just hacking the project files once its created

advent-of-clojure
|_ src
   |_ practicalli
      |_ advent_of_code_2019
         |_ 01_trinity_of_rocket_equasion.clj
It would have the matching path for test branch too. /cc @seancorfield

seancorfield19:12:42

@jr0cket This will get you pretty close to what you want:

clj -A:new app practicalli/advent-of-code-2019.01-trinity-of-rocket-equation

seancorfield19:12:55

(! 951)-> tree advent-of-code-2019.01-trinity-of-rocket-equation/
|____
| |____.gitignore
| |____.hgignore
| |____CHANGELOG.md
| |____deps.edn
| |____doc
| | |____intro.md
| |____LICENSE
| |____README.md
| |____resources
| | |____.keep
| |____src
| | |____practicalli
| | | |____advent_of_code_2019
| | | | |____01_trinity_of_rocket_equation.clj
| |____test
| | |____practicalli
| | | |____advent_of_code_2019
| | | | |____01_trinity_of_rocket_equation_test.clj

practicalli-johnny19:12:18

That great thanks. All I would do is just edit the top level directory name and its perfect. I was looking at the clj-new documentation and thinking I could also do this with generators. adding new namespaces with clj -A:new -m clj-new.generate ns=practicalli.advent_of_code_2019.01_,,,.clj . This would be handy to script up the adding of a namespace for each day, especially if I wanted a separate -data.clj file for my unique data (keeping the solution namespace cleaner).

seancorfield19:12:18

Yup, once you have the project folder, you can add new namespaces via the generator logic.