5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-08 21:11:40 +08:00
wails/v3/internal/flags/bindings.go
Fabio Massaioli 45b2681dfc
[v3] Fix binding generator output and import paths (#3334)
* Fix relative import path computation

* Fix models output path

* Add option to generate bindings using bundled runtime

* Update binding example

* Fix testdata

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-22 21:18:04 +11:00

15 lines
990 B
Go

package flags
type GenerateBindingsOptions struct {
Silent bool `name:"silent" description:"Silent mode"`
ModelsFilename string `name:"m" description:"The filename for the models file, excluding the extension" default:"models"`
TS bool `name:"ts" description:"Generate Typescript bindings"`
TSPrefix string `description:"The prefix for the typescript names" default:""`
TSSuffix string `description:"The postfix for the typescript names" default:""`
UseInterfaces bool `name:"i" description:"Use interfaces instead of classes"`
UseBundledRuntime bool `name:"b" description:"Use the bundled runtime instead of importing the npm package"`
ProjectDirectory string `name:"p" description:"The project directory" default:"."`
UseIDs bool `name:"ids" description:"Use IDs instead of names in the binding calls"`
OutputDirectory string `name:"d" description:"The output directory" default:"frontend/bindings"`
}