This commit is contained in:
maddalax 2024-11-01 07:53:48 -05:00
parent ea997b41de
commit aeb3a7be64
2 changed files with 5 additions and 17 deletions

View file

@ -16,7 +16,6 @@ import (
"log/slog"
"os"
"strings"
"sync"
)
const version = "1.0.3"
@ -79,21 +78,9 @@ func main() {
fmt.Printf("Generating CSS...\n")
css.GenerateCss(process.ExitOnError)
wg := sync.WaitGroup{}
wg.Add(1)
go func() {
defer wg.Done()
astgen.GenAst(process.ExitOnError)
}()
wg.Add(1)
go func() {
defer wg.Done()
run.EntGenerate()
}()
wg.Wait()
// generate ast needs to be run after css generation
astgen.GenAst(process.ExitOnError)
run.EntGenerate()
fmt.Printf("Starting server...\n")
process.KillAll()
@ -131,6 +118,7 @@ func main() {
} else if taskName == "css" {
_ = css.GenerateCss(process.ExitOnError)
} else if taskName == "ast" {
css.GenerateCss(process.ExitOnError)
_ = astgen.GenAst(process.ExitOnError)
} else if taskName == "run" {
run.MakeBuildable()

View file

@ -11,8 +11,8 @@ import (
func MakeBuildable() {
copyassets.CopyAssets()
astgen.GenAst(process.ExitOnError)
css.GenerateCss(process.ExitOnError)
astgen.GenAst(process.ExitOnError)
}
func Build() {