about summary refs log tree commit diff stats
path: root/internal/builder/builder.go
diff options
context:
space:
mode:
authorAlan Pearce2024-06-23 17:37:10 +0200
committerAlan Pearce2024-06-23 19:23:20 +0200
commit8cca5de5d0cd6b18c328a18de286eeb3b2c75b84 (patch)
tree2fdf48a815e81d8b6382e3dd9b3bdf6825d5606a /internal/builder/builder.go
parentfe4a23b550b7450e6e24cd3c78dfd575122d361d (diff)
downloadwebsite-8cca5de5d0cd6b18c328a18de286eeb3b2c75b84.tar.lz
website-8cca5de5d0cd6b18c328a18de286eeb3b2c75b84.tar.zst
website-8cca5de5d0cd6b18c328a18de286eeb3b2c75b84.zip
pre-compress static files
Diffstat (limited to 'internal/builder/builder.go')
-rw-r--r--internal/builder/builder.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go
index 4f305db..f3e61dc 100644
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -17,7 +17,6 @@ import (
 
 	"github.com/a-h/templ"
 	mapset "github.com/deckarep/golang-set/v2"
-	cp "github.com/otiai10/copy"
 	"github.com/pkg/errors"
 )
 
@@ -102,10 +101,7 @@ func build(outDir string, config config.Config) (*Result, error) {
 		return nil, errors.WithMessage(err, "could not create public directory")
 	}
 
-	err := cp.Copy("static", publicDir, cp.Options{
-		PreserveTimes:     true,
-		PermissionControl: cp.AddPermission(0755),
-	})
+	err := copyRecursive("static", publicDir)
 	if err != nil {
 		return nil, errors.WithMessage(err, "could not copy static files")
 	}