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

add migrate Laravel Mix to Vite #1627

Merged
merged 20 commits into from
Jun 10, 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
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,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}"
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_URL_REDIRECT=
Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/node_modules
/public/hot
/public/build
/public/storage
/storage/*.key
/vendor
Expand All @@ -15,10 +16,10 @@ yarn-error.log
_ide_helper.php
_ide_helper_models.php
.phpstorm.meta.php
/public/mix-manifest.json
public/css
public/js
/mix-manifest.json
css
js
public/img/*
public/images
images
composer.phar
.phpunit.cache
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY . .

RUN composer dump-autoload --no-dev --optimize

RUN npm run prod
RUN npm run build

CMD ["bash", "-c", "make db-prepare start-app"]

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deploy:
git push heroku main

setup: env-prepare sqlite-prepare install key db-prepare ide-helper
npm run development
npm run build

install-app:
composer install
Expand All @@ -27,7 +27,7 @@ start-app:
php artisan serve --host 0.0.0.0 --port ${PORT}

start-frontend:
npm run watch
npm run dev

db-prepare:
php artisan migrate:fresh --force --seed
Expand Down
1 change: 1 addition & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Yaml' => Symfony\Component\Yaml\Yaml::class,
'Vite' => Illuminate\Support\Facades\Vite::class,
],

];
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ services:
dockerfile: Dockerfile.dev
volumes:
- .:/app:delegated
ports:
- 5173:5173
command: ["make", "start-frontend"]

database:
Expand All @@ -29,7 +31,7 @@ services:
ports:
- 54320:5432
volumes:
- hexlet-sicp-pgdata:/var/lib/postgresql/data
- hexlet-sicp-pgdata:/var/lib/postgresql/data

volumes:
hexlet-sicp-pgdata:
Loading