I’m working my way through the Introduction to DAML, and in section 7 the result of running daml new foo
doesn’t match the structure discussed following the use of daml new
. All that is created is:
.
├── daml
│ ├── Main.daml
│ └── Setup.daml
└── daml.yaml
not daml/Intro/Asset/Role.daml
etc. Where are you supposed to get the template the tutorial is describing? And can the docs be updated to explain that?
3 Likes
Hi @Axman6-da, the docs are definitely confusing here, I’ll make sure to fix them.
daml new
takes 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-7
and it will create directory foo
with the corresponding directory structure.
If you omit the template name, it defaults to the skeleton
template 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.
5 Likes
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 new
for that page for those who haven’t been writing it all by hand.
Thanks for the super quick reply!
3 Likes