Skip to content

Commit

Permalink
replaced laravel-mix by bun build
Browse files Browse the repository at this point in the history
  • Loading branch information
believelody committed Jul 17, 2024
1 parent eef0620 commit 3f5e086
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

public/script/*
public/scripts/*
public/mix-manigest.json
public/styles/index.css

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ COPY --link . .

RUN bun tailwind:prod

RUN bunx mix
RUN bun build-js:prod

COPY --link . .

Expand Down
Binary file modified bun.lockb
Binary file not shown.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"dev": "bun run --hot src/index.tsx",
"tailwind:dev": "bunx tailwindcss -i ./src/styles/index.css -o ./public/styles/index.css --watch",
"tailwind:prod": "bunx tailwindcss -i ./src/styles/index.css -o ./public/styles/index.css",
"mix": "bunx mix watch",
"start:dev": "concurrently \"bun dev\" \"bun tailwind:dev\" \"bun mix\"",
"start:prod": "bun tailwind:prod && bunx mix && NODE_ENV=production bun run src/index.tsx",
"build-js:dev": "bun build src/script/app.js --outfile=public/script/app.js --watch",
"build-js:prod": "bun build src/script/app.js --outfile=public/script/app.js --minify",
"start:dev": "concurrently \"bun dev\" \"bun tailwind:dev\" \"bun build-js:dev\"",
"start:prod": "bun tailwind:prod && bun build-js:prod && NODE_ENV=production bun run src/index.tsx",
"docker:dev:up": "docker compose --env-file ./.env.development up --build mongo dev",
"docker:dev:down": "docker compose --env-file ./.env.development down mongo dev",
"docker:prod:up": "docker compose --env-file ./.env.production up --build app",
Expand All @@ -30,7 +31,6 @@
"classnames": "^2.5.1",
"clsx": "^2.1.1",
"hono": "^4.1.3",
"laravel-mix": "^6.0.49",
"lucia": "^3.1.1",
"mongoose": "^8.4.4",
"oslo": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/script/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Alpine from '$script/alpine/index.js';
import Alpine from './alpine/index.js';

window.Alpine = Alpine;

Expand Down
4 changes: 2 additions & 2 deletions webpack.mix.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
let mix = require("laravel-mix");
// let mix = require("laravel-mix");

mix.alias({ $script: __dirname + "/src/script" }).setPublicPath("public").js("src/script/app.js", "public/script");
// mix.alias({ $script: __dirname + "/src/script" }).setPublicPath("public").js("src/script/app.js", "public/script");

0 comments on commit 3f5e086

Please sign in to comment.