nixin72 / from-template

Raco tool for cloning templates from the racket-templates org
MIT License
8 stars 4 forks source link

List templates if no template name is provided #18

Closed nixin72 closed 2 years ago

nixin72 commented 2 years ago

Similar to the way dotnet new will list all the available project types when you don't provide a template to use, raco new will do the same instead of giving an error message.

spdegabrielle commented 2 years ago

AWESOME

nixin72 commented 2 years ago

Before merging I'm gonna add some more metadata to the templates files themselves in racket-templates so that we can get a little more data in the listing rather than just the name.

I've also did it in a previous commit not in this PR, but you can also do raco new --list <query> and it'll search for packages that contain the query string you give it.

I'll work on this some more this evening and document the changes a bit better in the README.

nixin72 commented 2 years ago

Okay, listing templates works well now. I've added descriptions to the templates, we can change what data we have later, but I think going into a tagging system isn't really necessary and if we want to do that we should just use the existing infrastructure for Racket packages.

This also addresses #15 now and provides the list-templates function to return a list of hashes of all the templates available.

nixin72 commented 2 years ago

If you have any comments or anything you'd like added/changed @spdegabrielle let me know. Otherwise if it's good, you can close #13 and #15 and I'll merge this in :+1:

spdegabrielle commented 2 years ago

Please go ahead and merge. I will need to provide a PR to sauron to add the list-templates function