I have a NuGet package with some global domain types (not annotated with [TsExport...] attributes) for which I'd like to generate TS equivalent in "domain" folder.
I also have a local "Domain" project referencing the aforementioned package and which define domain types specific to an application I'd also like to generate in "domain" folder ; I can annotate them with [TsExport...] attributes if needed.
In my ASP.NET Core project I have some view models (which reference the domain types), and this time I'd like to generate their TS files in another "models" folder.
I can annotate them too.
The closest I get is the combination of:
{
"assemblies": [
"../MyApp.Domain/bin/Debug/net9.0/MyApp.Domain.dll",
"bin/Debug/net9.0/MyApp.Web.dll"
],
"outputPath": "Frontend/src/domain"
}
- annotations on the view models
[ExportTsClass(OutputDir = "Frontend/src/models")] (also tried with forward "./")
But I see that path specified with OutputDir are relative to outputPath, so the model's TS are generated in "Frontend/src/domain/Frontend/src/models"!
I've tried with "/Frontend/src/models" (forward slash) but it fails with a dependency resolution error.
What are my options?
I'm OK with implementing a GenerationSpec if needed if this use-case can't be solved by tweaking configuration file, CLI parameters, or attributes.
I have a NuGet package with some global domain types (not annotated with
[TsExport...]attributes) for which I'd like to generate TS equivalent in"domain"folder.I also have a local "Domain" project referencing the aforementioned package and which define domain types specific to an application I'd also like to generate in
"domain"folder ; I can annotate them with[TsExport...]attributes if needed.In my ASP.NET Core project I have some view models (which reference the domain types), and this time I'd like to generate their TS files in another
"models"folder.I can annotate them too.
The closest I get is the combination of:
[ExportTsClass(OutputDir = "Frontend/src/models")](also tried with forward"./")But I see that path specified with
OutputDirare relative tooutputPath, so the model's TS are generated in"Frontend/src/domain/Frontend/src/models"!I've tried with
"/Frontend/src/models"(forward slash) but it fails with a dependency resolution error.What are my options?
I'm OK with implementing a
GenerationSpecif needed if this use-case can't be solved by tweaking configuration file, CLI parameters, or attributes.