So we are starting a new angular / webapi project, and we are splitting it up such that the client and the rest API are in 2 separate projects. The client project has no server-executed code. Just html and typescript (which we transpile to javascript, of course)
I want for my typewriter-generated DTOs to land in the client, but I don't even want to reference the WebAPI project from my client project. How can I set up the template so that when I save a change to my DTO, the typescript file is written to my client app? (or is there a different way to accomplish this?)
As long as the two projects are in the same solution you can render the template from the client project without adding a reference to the API project.
To do this you'll need to add a constructor to the tst-template to include the API project.
${
Template(Settings settings)
{
settings.IncludeProject("Project.Name");
}
}
$Classes(...)[...]
Have a look at http://frhagn.github.io/Typewriter/pages/getting-started.html#settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With