mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 06:19:43 +08:00
Merge pull request #52 from wailsapp/minor-fixes
remove frontend build from serve
This commit is contained in:
commit
c15fd822c1
@ -1,9 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/leaanthony/spinner"
|
||||
"github.com/wailsapp/wails/cmd"
|
||||
)
|
||||
@ -38,47 +35,12 @@ 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")
|
||||
}
|
||||
}
|
||||
|
||||
// Check Mewn is installed
|
||||
err = cmd.CheckMewn()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Save project directory
|
||||
// TODO: Test not compiling front end for bridge mode
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user