mirror of
https://github.com/taigrr/wails.git
synced 2026-04-14 19:01:09 -07:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
184ce763c1 | ||
|
|
229ee95f91 |
@@ -1,4 +1,4 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
// Version - Wails version
|
// Version - Wails version
|
||||||
const Version = "v1.16.5"
|
const Version = "v1.16.6"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ func init() {
|
|||||||
projectOptions := projectHelper.NewProjectOptions()
|
projectOptions := projectHelper.NewProjectOptions()
|
||||||
commandDescription := `Generates a new Wails project using the given flags.
|
commandDescription := `Generates a new Wails project using the given flags.
|
||||||
Any flags that are required and not given will be prompted for.`
|
Any flags that are required and not given will be prompted for.`
|
||||||
|
build := false
|
||||||
|
|
||||||
initCommand := app.Command("init", "Initialises a new Wails project").
|
initCommand := app.Command("init", "Initialises a new Wails project").
|
||||||
LongDescription(commandDescription).
|
LongDescription(commandDescription).
|
||||||
@@ -23,7 +24,8 @@ Any flags that are required and not given will be prompted for.`
|
|||||||
StringFlag("template", "Template name", &projectOptions.Template).
|
StringFlag("template", "Template name", &projectOptions.Template).
|
||||||
StringFlag("name", "Project name", &projectOptions.Name).
|
StringFlag("name", "Project name", &projectOptions.Name).
|
||||||
StringFlag("description", "Project description", &projectOptions.Description).
|
StringFlag("description", "Project description", &projectOptions.Description).
|
||||||
StringFlag("output", "Output binary name", &projectOptions.BinaryName)
|
StringFlag("output", "Output binary name", &projectOptions.BinaryName).
|
||||||
|
BoolFlag("build", "Build project after generating", &build)
|
||||||
|
|
||||||
initCommand.Action(func() error {
|
initCommand.Action(func() error {
|
||||||
|
|
||||||
@@ -64,6 +66,10 @@ Any flags that are required and not given will be prompted for.`
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
genSpinner.Success()
|
genSpinner.Success()
|
||||||
|
if !build {
|
||||||
|
logger.Yellow("Project '%s' initialised. Run `wails build` to build it.", projectOptions.Name)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Build the project
|
// Build the project
|
||||||
cwd, _ := os.Getwd()
|
cwd, _ := os.Getwd()
|
||||||
|
|||||||
Reference in New Issue
Block a user