mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 15:30:37 +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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/leaanthony/spinner"
|
"github.com/leaanthony/spinner"
|
||||||
"github.com/wailsapp/wails/cmd"
|
"github.com/wailsapp/wails/cmd"
|
||||||
)
|
)
|
||||||
@ -38,47 +35,12 @@ func init() {
|
|||||||
return err
|
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
|
// Check Mewn is installed
|
||||||
err = cmd.CheckMewn()
|
err = cmd.CheckMewn()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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
|
// Install dependencies
|
||||||
err = cmd.InstallGoDependencies()
|
err = cmd.InstallGoDependencies()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user