From aeb3a7be64dac673c6ee08aab7ecaa85d529e5a6 Mon Sep 17 00:00:00 2001 From: maddalax Date: Fri, 1 Nov 2024 07:53:48 -0500 Subject: [PATCH] fixes --- cli/htmgo/runner.go | 20 ++++---------------- cli/htmgo/tasks/run/build.go | 2 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/cli/htmgo/runner.go b/cli/htmgo/runner.go index d3c7921..bf6eaee 100644 --- a/cli/htmgo/runner.go +++ b/cli/htmgo/runner.go @@ -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() diff --git a/cli/htmgo/tasks/run/build.go b/cli/htmgo/tasks/run/build.go index 724e885..2f2f10b 100644 --- a/cli/htmgo/tasks/run/build.go +++ b/cli/htmgo/tasks/run/build.go @@ -11,8 +11,8 @@ import ( func MakeBuildable() { copyassets.CopyAssets() - astgen.GenAst(process.ExitOnError) css.GenerateCss(process.ExitOnError) + astgen.GenAst(process.ExitOnError) } func Build() {