Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions docs/src/usage/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ The behaviour of Typeshare can be customized by either passing options on the co
- `-l`, `--lang`
(Required) The language you want your definitions to be generated in. Currently, this option can be set to either `kotlin`, `swift`, `go`, or `typescript`.
- `-o`, `--output-file`
(Required) The file path to which the generated definitions will be written.
(Required if not using -d) The file path to which the generated definitions will be written.
- `-d`, `--output-folder`
(Required if not using -o) The output directory for outputting multiple files/modules.

- `-s`, `--swift-prefix`
Specify a prefix that will be prepended to type names when generating types in Swift.
Specify a prefix that will be prepended to type names when generating types in Swift.

- `-M`, `--module-name`
Specify the name of the Kotlin module for generated Kotlin source code.
Specify the name of the Kotlin module for generated Kotlin source code.

- `-j`, `--java-package`
Specify the name of the Java package for generated Kotlin types.
Specify the name of the Java package for generated Kotlin types.

- `-c`, `--config-file`
Instead of searching for a `typeshare.toml` file, this option can be set to specify the path to the configuration file that Typeshare will use.
Expand All @@ -27,6 +29,8 @@ The behaviour of Typeshare can be customized by either passing options on the co
A list argument that you can pass any number of glob patterns to. All folders and files given will be searched recursively, and all Rust sources found will be used to create a singular language source file.
- `--go-package`
The name of the Go package for use with building for Go. This will be included in the header of the output file. This option will only be available if `typeshare-cli` was built with the `go` feature.
- `--target-os`
Optional argument to skip any types annotated with Rust `#[target_os = "target"]` that do not match the argument provided.

## Configuration File

Expand Down Expand Up @@ -54,4 +58,4 @@ In the configuration file, you can specify the options you want to set so that t
In order to create a config file you can run the following command to generate one in your current directory.
```
typeshare -g
```
```