DAML tutorial section 7 template
- Axman6-daOP 3
I’m working my way through the Introduction to DAML, and in section 7 the result of running
daml new foodoesn’t match the structure discussed following the use ofdaml new. All that is created is:. ├── daml │ ├── Main.daml │ └── Setup.daml └── daml.yamlnot
daml/Intro/Asset/Role.damletc. Where are you supposed to get the template the tutorial is describing? And can the docs be updated to explain that? - cocreature 5
Hi @Axman6-da, the docs are definitely confusing here, I’ll make sure to fix them.
daml newtakes two arguments. The first is the directory you want to create the new project in and the second (optional) argument is the name of the template you want to base your new project on.So to replicate the example from the docs, you can use
daml new foo daml-intro-7and it will create directoryfoowith the corresponding directory structure.If you omit the template name, it defaults to the
skeletontemplate which is a very minimal template. If you look closely at the docs they do actually say this correctly but then don’t mention how you can get the directory structure described in the section below. - Axman6-da 3
Yeah I feel like it was mentioned earlier, but there have been several chapters between when it was mentioned and this part of the tutorial, so it’s worth reiterating how to get the code. In my case it’s been about a week since I started the tutorial so I’d forgotten that was an option, and I would guess for many people it’s likely to be several days between the beginning and the end of the tutorial. I’d also been writing everything from scratch to build the muscle memory so hadn’t been using the templates - it might be worth adding to each chapter how use
daml newfor that page for those who haven’t been writing it all by hand.Thanks for the super quick reply!