Skip to content

Commit 014abba

Browse files
Moving to vitejs and @FortAwesome 6
1 parent e306bc3 commit 014abba

37 files changed

+329
-4673
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ PUSHER_APP_KEY=
3636
PUSHER_APP_SECRET=
3737
PUSHER_APP_CLUSTER=
3838

39-
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
40-
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
39+
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
40+
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
4141

4242
GITHUB_ID=
4343
GITHUB_SECRET=

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/public/js
77
/public/mix-manifest.json
88
public/media/
9+
public/build/
910
/vendor
1011
/.idea
1112
/.vagrant

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
{
22
"private": true,
3+
"type": "module",
34
"scripts": {
45
"lint": "eslint --ext .js resources/js",
5-
"dev": "yarn development",
6-
"development": "mix",
7-
"watch": "mix watch",
8-
"watch-poll": "mix watch -- --watch-options-poll=1000",
9-
"hot": "mix watch --hot",
10-
"prod": "yarn production",
11-
"production": "mix --production"
6+
"dev": "vite",
7+
"build": "vite build"
128
},
139
"dependencies": {
10+
"@fortawesome/fontawesome-free": "^6.4.2",
1411
"@hotwired/turbo": "^7.1.0",
1512
"bootstrap": "^4.6.1",
1613
"clipboard": "2.0.10",
1714
"cross-env": "7.0.3",
18-
"font-awesome": "4.7.0",
1915
"jquery": "3.6.0",
2016
"laravel-echo": "1.11.7",
21-
"laravel-mix": "6.0.43",
17+
"laravel-vite-plugin": "^0.8.0",
2218
"popper.js": "1.16.1",
2319
"pusher-js": "7.1.0-beta",
24-
"trumbowyg": "2.25.1"
20+
"trumbowyg": "2.25.1",
21+
"vite": "^4.4.9"
2522
},
2623
"devDependencies": {
2724
"eslint": "8.14.0",

resources/js/bootstrap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ new Clipboard('[data-clipboard-target]')
2626

2727
window.Echo = new Echo({
2828
broadcaster: 'pusher',
29-
key: process.env.MIX_PUSHER_APP_KEY,
30-
cluster: process.env.MIX_PUSHER_APP_CLUSTER,
29+
key: import.meta.env.VITE_PUSHER_APP_KEY,
30+
cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER,
3131
encrypted: true
3232
})

resources/sass/_variables.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
$fa-font-display: swap;
2+
$fa-font-path: "@fortawesome/fontawesome-free/webfonts";
3+
14
$orange: hsl(14, 100%, 53%);
25
$yellow: hsl(48, 100%, 67%);
36
$green: hsl(141, 71%, 48%);

resources/sass/admin.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "~trumbowyg/dist/ui/trumbowyg.min.css";
1+
@import "node_modules/trumbowyg/dist/ui/trumbowyg.min.css";
22

33
.admin-body {
44
padding-top: 56px;

resources/sass/app.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
@import "variables";
22

33
// Bootstrap
4-
@import "~bootstrap/scss/bootstrap";
4+
@import "node_modules/bootstrap/scss/bootstrap";
55

66
// Base
77
@import "base/base";
88

99
// Font-awesome
10-
@import "~font-awesome/scss/font-awesome";
10+
@import "node_modules/@fortawesome/fontawesome-free/scss/fontawesome";
11+
@import "node_modules/@fortawesome/fontawesome-free/scss/regular";
12+
@import "node_modules/@fortawesome/fontawesome-free/scss/solid";
13+
@import "node_modules/@fortawesome/fontawesome-free/scss/brands";
1114

1215
// Modules
1316
@import "modules/form";

resources/views/admin/comments/_form.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
{!! Form::close() !!}
3838

3939
{!! Form::model($comment, ['method' => 'DELETE', 'route' => ['admin.comments.destroy', $comment], 'class' => 'form-inline pull-right', 'data-confirm' => __('forms.comments.delete')]) !!}
40-
{!! Form::button('<i class="fa fa-trash" aria-hidden="true"></i> ' . __('comments.delete'), ['class' => 'btn btn-link text-danger', 'name' => 'submit', 'type' => 'submit']) !!}
40+
{!! Form::button('<i class="fa-solid fa-trash" aria-hidden="true"></i> ' . __('comments.delete'), ['class' => 'btn btn-link text-danger', 'name' => 'submit', 'type' => 'submit']) !!}
4141
{!! Form::close() !!}

resources/views/admin/comments/_list.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
<td>{{ humanize_date($comment->posted_at, 'd/m/Y H:i:s') }}</td>
1919
<td>
2020
<a href="{{ route('admin.comments.edit', $comment) }}" class="btn btn-primary btn-sm">
21-
<i class="fa fa-pencil" aria-hidden="true"></i>
21+
<i class="fa-solid fa-pencil" aria-hidden="true"></i>
2222
</a>
2323

2424
{!! Form::model($comment, ['method' => 'DELETE', 'route' => ['admin.comments.destroy', $comment], 'class' => 'form-inline', 'data-confirm' => __('forms.comments.delete')]) !!}
25-
{!! Form::button('<i class="fa fa-trash" aria-hidden="true"></i>', ['class' => 'btn btn-danger btn-sm', 'name' => 'submit', 'type' => 'submit']) !!}
25+
{!! Form::button('<i class="fa-solid fa-trash" aria-hidden="true"></i>', ['class' => 'btn btn-danger btn-sm', 'name' => 'submit', 'type' => 'submit']) !!}
2626
{!! Form::close() !!}
2727
</td>
2828
</tr>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<x-card class="bg-primary text-light m-2">
22
<div class="row justify-content-between">
3-
<i class="fa fa-comments fa-5x" aria-hidden="true"></i>
3+
<i class="fa-regular fa-comments fa-5x" aria-hidden="true"></i>
44
<div class="text-right">
55
<div class="huge">{{ $comments->count() }}</div>
66
<div>{{ trans_choice('comments.new_comments', $comments->count()) }}</div>
@@ -10,7 +10,7 @@
1010
<x-slot name="footer">
1111
<a href="{{ route('admin.comments.index') }}" class="d-flex justify-content-between text-light">
1212
<span>@lang('dashboard.details')</span>
13-
<span><i class="fa fa-arrow-circle-right"></i></span>
13+
<span><i class="fa-solid fa-arrow-circle-right"></i></span>
1414
</a>
1515
</x-slot>
1616
</x-card>

0 commit comments

Comments
 (0)