From db9fb16afeb59345685037ff0ce929111f09ff04 Mon Sep 17 00:00:00 2001 From: Darrell Roberts Date: Mon, 8 Jul 2024 12:59:51 -0400 Subject: [PATCH 1/2] Update configuration document --- docs/src/usage/configuration.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/src/usage/configuration.md b/docs/src/usage/configuration.md index 78dd80cb..324c7834 100644 --- a/docs/src/usage/configuration.md +++ b/docs/src/usage/configuration.md @@ -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. @@ -54,4 +56,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 -``` \ No newline at end of file +``` From 824b465c346a6e0c2bb0eb6187e21af31398d426 Mon Sep 17 00:00:00 2001 From: Darrell Roberts Date: Mon, 8 Jul 2024 14:12:36 -0400 Subject: [PATCH 2/2] add doc for --target-os --- docs/src/usage/configuration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/usage/configuration.md b/docs/src/usage/configuration.md index 324c7834..dc40d438 100644 --- a/docs/src/usage/configuration.md +++ b/docs/src/usage/configuration.md @@ -29,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