Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Laravel Mix to Vite #97

Merged
merged 17 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ APP_DEBUG=true
APP_URL=http://localhost
APP_PUBLIC_URL=http://localhost
APP_IS_VPN=false
MIX_APP_MAX_ORDER_COUNT=8
VITE_APP_MAX_ORDER_COUNT=8

APP_PORTALS_URL=http://127.0.0.1:8000
APP_PORTALS_API_SECRET=secret
Expand Down Expand Up @@ -59,8 +59,8 @@ PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

OCTANE_HTTPS=false
OCTANE_WORKERS=4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/node_modules
/public/hot
/public/build
/public/storage
/resources/*.csv
/storage/*.key
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN apk add --no-cache nodejs npm
RUN npm install

# build application
# RUN npm run production
# RUN npm run build

# install roadrunner
COPY --from=spiralscout/roadrunner:2023.3.2 /usr/bin/rr /usr/bin/rr
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/PersonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function buy(Request $request, int $id, int $articleID)
$article = Article::findOrFail($articleID);

$amount = $request['amount'];
if (! is_numeric($amount) || $amount < 1 || $amount > env('MIX_APP_MAX_ORDER_COUNT')) {
if (! is_numeric($amount) || $amount < 1 || $amount > env('VITE_APP_MAX_ORDER_COUNT')) {
return Redirect::route('person.show', ['id' => $id]);
}

Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11,705 changes: 3,042 additions & 8,663 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,27 @@
"description": "Tally system for the first week of the Department of Electrical Engineering and Information Technology at FH Aachen - University of Applied Sciences.",
"version": "2.0.0",
"license": "MIT",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/fsr5-fhaachen/strichlistensystem"
},
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
"axios": "^1.7.7",
"browser-sync": "^2.26.2",
"browser-sync-webpack-plugin": "^2.3.0",
"laravel-mix": "^6.0.49",
"laravel-vite-plugin": "^1.0.5",
"lodash": "^4.17.21",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.12",
"unplugin-vue-components": "^0.27.4",
"unplugin-auto-import": "^0.18.3",
"vite": "^5.4.7",
"vue-loader": "^17.4.2"
},
"dependencies": {
Expand All @@ -35,6 +34,7 @@
"@fortawesome/vue-fontawesome": "^3.0.8",
"@inertiajs/inertia": "^0.11.1",
"@inertiajs/inertia-vue3": "^0.6.0",
"@vitejs/plugin-vue": "^5.1.4",
"@vueuse/core": "^11.1.0",
"nprogress": "^0.2.0",
"postcss-import": "^16.1.0",
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Loading
Loading