Skip to content

Commit

Permalink
doc - Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
canhorn authored May 29, 2024
1 parent 8097a85 commit 2e356fe
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ The Wasm interop project can be found in the [canhorn/EventHorizon.Blazor.Intero
* [NodeJS](https://nodejs.org/)
* Required Version >= 20

## Using the Tool

~~~ bash
dotnet tool install -g EventHorizon.Blazor.TypeScript.Interop.Tool
~~~

## Command Line Options

Identifier | Details | Required/Default
--- | --- | ---
-s, --source <source> | TypeScript Definition to generate from, can be a File or URL, accepts multiple or as Array | REQUIRED
-c, --class-to-generate <class-to-generate> | A Class to generate, accepts multiple or as Array | REQUIRED
-a, --project-assembly <project-assembly> | The project name of the Assembly that will be generated | Default: "Generated.WASM"
-l, --project-generation-location <project-generation-location> | The directory where the Generated Project assembly will be saved | Default: "_generated"
-f, --force | This will force generation, by deleting --project-generation-location | Default: (False)
-p, --parser | The type of TypeScript parser to use, Supported values: ("dotnet","nodejs") | Default: ("dotnet")
-h, --host-type | The host type the source should be generator for, Supported values: ("wasm","server"). | Default: ("wasm")

More details in the [Tool README.md](./Tool/EventHorizon.Blazor.TypeScript.Interop.Tool/README.md).

## TypeScript Parser

The generation relies heavily on the TypeScript Abstract Syntax Tree and so the code includes ways to parse the source files into a AST representation for easier generation.
Expand Down

0 comments on commit 2e356fe

Please sign in to comment.