5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 04:29:35 +08:00

Speed up Wails Serve

This commit is contained in:
Lea Anthony 2019-04-20 12:15:19 +10:00
parent c4a042cb1d
commit 2d5825d73d
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -2,7 +2,6 @@ package main
import (
"fmt"
"os"
"github.com/leaanthony/spinner"
"github.com/wailsapp/wails/cmd"
@ -42,40 +41,6 @@ func init() {
return err
}
// Validate config
// Check if we have a frontend
err = cmd.ValidateFrontendConfig(projectOptions)
if err != nil {
return err
}
// Program checker
program := cmd.NewProgramHelper()
if projectOptions.FrontEnd != nil {
// npm
if !program.IsInstalled("npm") {
return fmt.Errorf("it appears npm is not installed. Please install and run again")
}
}
// Save project directory
projectDir := fs.Cwd()
// Install deps
if projectOptions.FrontEnd != nil {
err = cmd.InstallFrontendDeps(projectDir, projectOptions, forceRebuild, "serve")
if err != nil {
return err
}
}
// Move to project directory
err = os.Chdir(projectDir)
if err != nil {
return err
}
// Install dependencies
err = cmd.InstallGoDependencies()
if err != nil {