mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 18:01:17 +08:00

* Add `port` flag to dev command, ... Add support for environment variable WAILS_VITE_PORT * Check if port is already in use * Update changelog --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
23 lines
523 B
Go
23 lines
523 B
Go
package commands
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/pterm/pterm"
|
|
"github.com/wailsapp/wails/v3/internal/flags"
|
|
)
|
|
|
|
func Build(_ *flags.Build) error {
|
|
return wrapTask("build")
|
|
}
|
|
|
|
func Package(_ *flags.Package) error {
|
|
return wrapTask("package")
|
|
}
|
|
|
|
func wrapTask(command string) error {
|
|
pterm.Warning.Printf("`wails3 %s` is an alias for `wails3 task %s`. Use `wails task` for better control and more options.\n", command, command)
|
|
os.Args = []string{"wails3", "task", command}
|
|
return RunTask(&RunTaskOptions{}, []string{})
|
|
}
|