Skip to content

Commit

Permalink
fix(build): remove old config code from dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
vednoc committed Oct 13, 2024
1 parent c9a8ff6 commit 9b1b3ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
4 changes: 1 addition & 3 deletions cmd/userstyles-fonts/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"path/filepath"
"strings"
"time"

"userstyles.world/modules/config"
)

var (
Expand Down Expand Up @@ -58,7 +56,7 @@ func getAsset() (Asset, error) {
}

asset := release.Assets[0]
asset.Path = path.Join(config.Storage.DataDir, asset.Name)
asset.Path = path.Join("data", asset.Name)

return asset, nil
}
Expand Down
11 changes: 3 additions & 8 deletions cmd/userstyles-ts/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package main

import (
"log"
"os"

"github.com/evanw/esbuild/pkg/api"

"userstyles.world/modules/config"
"userstyles.world/modules/log"
)

var (
Expand All @@ -31,15 +29,12 @@ func main() {

// TODO: Remove this code?
if shouldWatch {
// Ensure we're seeing the error messages in stdout.
config.App.Production = false
log.Initialize()
watch = &api.WatchMode{
OnRebuild: func(result api.BuildResult) {
if len(result.Errors) > 0 {
log.Info.Printf("Watch build failed: %d errors\n", len(result.Errors))
log.Printf("Watch build failed: %d errors\n", len(result.Errors))
} else {
log.Info.Printf("Watch build succeeded: %d warnings\n", len(result.Warnings))
log.Printf("Watch build succeeded: %d warnings\n", len(result.Warnings))
}
},
}
Expand Down
2 changes: 1 addition & 1 deletion tools/run
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ setup() {
if [ "$BUILD" -eq 1 ]; then build sass-dev; fi
;;
all)
setup fonts; setup ts; setup sass
setup fonts; setup ts; setup sass; setup go
;;
esac
}
Expand Down

0 comments on commit 9b1b3ee

Please sign in to comment.