generated from alecodes/base-template
feat: add frontend compilation task with bun
This commit is contained in:
parent
6cb75aa442
commit
6b7642b693
6 changed files with 174 additions and 0 deletions
17
.justfile
17
.justfile
|
|
@ -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!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue