Build with Magefile #104341
@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/magefile/mage/mg"
|
"github.com/magefile/mage/mg"
|
||||||
"github.com/magefile/mage/sh"
|
"github.com/magefile/mage/sh"
|
||||||
|
"github.com/magefile/mage/target"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -52,6 +53,13 @@ func FlamencoWorker() error {
|
|||||||
|
|
||||||
// Build the webapp as static files that can be served
|
// Build the webapp as static files that can be served
|
||||||
func WebappStatic() error {
|
func WebappStatic() error {
|
||||||
|
runInstall, err := target.Dir("web/app/node_modules")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if runInstall {
|
||||||
|
mg.SerialDeps(WebappInstallDeps)
|
||||||
|
}
|
||||||
if err := cleanWebappStatic(); err != nil {
|
if err := cleanWebappStatic(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -63,7 +71,7 @@ func WebappStatic() error {
|
|||||||
// When changing the base URL, also update the line
|
// When changing the base URL, also update the line
|
||||||
// e.GET("/app/*", echo.WrapHandler(webAppHandler))
|
// e.GET("/app/*", echo.WrapHandler(webAppHandler))
|
||||||
// in `cmd/flamenco-manager/main.go`
|
// in `cmd/flamenco-manager/main.go`
|
||||||
err := sh.RunWithV(env,
|
err = sh.RunWithV(env,
|
||||||
"yarn",
|
"yarn",
|
||||||
"--cwd", "web/app",
|
"--cwd", "web/app",
|
||||||
"build",
|
"build",
|
||||||
|
Loading…
Reference in New Issue
Block a user