feat: add frontend compilation task with bun

This commit is contained in:
Alexander Navarro 2025-02-19 10:44:02 -03:00
parent 6cb75aa442
commit 6b7642b693
6 changed files with 174 additions and 0 deletions

View file

@ -15,3 +15,20 @@ dev:
migrate: (docker-compose "run dbmate migrate")
rollback: (docker-compose "run dbmate rollback")
build-frontend:
#!/usr/bin/env bun
import sassPlugin from "@alecodes/bun-plugin-sass";
const result = await Bun.build({
entrypoints: ["templates/base.html"],
outdir: "dist",
naming: {
entry: "[dir]/[name].[ext]",
chunk: "chunks/[name]-[hash].[ext]",
asset: "assets/[name]-[hash].[ext]",
},
plugins: [sassPlugin],
});
console.log("Assets compiled!");