From 37b395c308f5293e707694efd49c4b546f469110 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 22 Jan 2023 20:40:35 +1100 Subject: [PATCH] [v3] Add Naive build command --- v3/cmd/wails/main.go | 1 + v3/internal/commands/build.go | 11 +++++++++++ v3/internal/flags/build.go | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 v3/internal/commands/build.go create mode 100644 v3/internal/flags/build.go diff --git a/v3/cmd/wails/main.go b/v3/cmd/wails/main.go index 77eaa120d..b4f57d25d 100644 --- a/v3/cmd/wails/main.go +++ b/v3/cmd/wails/main.go @@ -11,6 +11,7 @@ import ( func main() { app := clir.NewCli("Wails", "The Wails CLI", "v3") + app.NewSubCommandFunction("build", "Build the project", commands.Build) app.NewSubCommandFunction("init", "Initialise a new project", commands.Init) task := app.NewSubCommand("task", "Run and list tasks") task.NewSubCommandFunction("run", "Run a task", commands.RunTask) diff --git a/v3/internal/commands/build.go b/v3/internal/commands/build.go new file mode 100644 index 000000000..901c4b7ee --- /dev/null +++ b/v3/internal/commands/build.go @@ -0,0 +1,11 @@ +package commands + +import ( + "github.com/wailsapp/wails/v3/internal/flags" +) + +func Build(options *flags.Build) error { + return RunTask(&RunTaskOptions{ + Name: "build", + }) +} diff --git a/v3/internal/flags/build.go b/v3/internal/flags/build.go new file mode 100644 index 000000000..260c6067d --- /dev/null +++ b/v3/internal/flags/build.go @@ -0,0 +1,5 @@ +package flags + +type Build struct { + Common +}