dotnet new templates - Item Templates, are they a ...
# package-development
w
And semi-related question for you @Lotte with dotnet new templates. I vaguely remember dotnet new item templates, to add a single item/thing. Do you know if this is a thing or am I hallucinating ?!
My thought is to create a dotnet new template for the clientside/vite stuff etc for V14 pacvkage dev to compliment the RCL and main Website templates from Umbraco But couple of things, don't wanna step on your toes with opinionated template nor if HQ/Package team are working on this. The train of thought re item templates, is that perhaps then VS or Rider and the CLI will light up with new items. So that we can add a new V14 Dashboard, or a V14 Header App etc... Thoughts Lotte ?
l
Dotnet new item templates are definitely a thing! For adding files into an existing project, rather than project templates that are for creating a project The demos in my CG talk start with a couple of item templates, then moves on to the more complex project templates. I’ll get the templates I created for that talk onto GitHub today (been meaning to!) I think item templates work well when you know the likely structure of a project. Or you’re adding something that has to be in a certain folder location.
Personally I don’t know v14 nearly well enough to start having opinions in the way I did for the v10-13 opinionated package starter. So if you do then I’ll look forward to seeing what you come up with! The only package starting templates for v14, that I know of, are linked to from the Bellissima resources. https://github.com/umbraco/Umbraco.Packages/blob/main/bellissima/README.md And the Dotnet template that comes with the Umbraco.Templates but I haven’t had a chance to look at that yet, but assume it's still the bare minimum and "unopinionated"
And just in case it’s useful to spark some thoughts … check out https://github.com/umbraco/Package.templates It’s outdated now, but the package team did work on templates that would add a dashboard etc. so perhaps food for thought there And there’s also the UI Examples project https://github.com/umbraco/ui-examples that the package team has worked on to show folks how to do things
But I love the idea of an opinionated package starter for v14. Which has the main template for starting the project, but then also item templates for adding specific stuff. Looking forward to seeing what you get up to! And of course I should say go watch my talk in the Umbraco App (talks still available to ticket holders) 😉
The opinionated package starter that I released was also helping with all the stuff 'outside' of the package itself. A good start of a readme, github action to push to nuget, umbraco-marketplace json file etc. If you wanted to include those sorts of things as well, then I'd be delighted to collaborate on making this existing opinionated starter work for v14, i.e. start a v14 branch on this existing repo. Of course if you want to go your own way then please do!
w
Thanks Lotte, will have a think and see if my creativity and enthusiasm lasts. Currentlty 101 ideas swirling around in my head and only little free time to hack & play. Will let you know here if I do kick anything off.
l
I empathise with the "all the ideas, not enough time" feelings! Good to percolate out loud though, for sure. And yes please let's have a chat if you do want to go further, be a good excuse for a catch-up 🙂
6 Views