Skip to content

Commit f77882c

Browse files
committed
Add BrowserSync mix package
1 parent 63bc585 commit f77882c

File tree

7 files changed

+8166
-109
lines changed

7 files changed

+8166
-109
lines changed

src/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/node_modules
22
/public/hot
33
/public/storage
4+
/public/dist
45
/storage/*.key
56
/vendor
67
.env

src/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Batteries included ready to use development environment for Laravel.
44

5-
## Preinstalled packages
5+
## Preinstalled laravel packages
66

77
- [clockwork](https://github.com/itsgoingd/clockwork): Modern debugging tool for Laravel. (debugbar alternative)
88
- Navigate to `/clockwork` in your browser.
@@ -29,6 +29,11 @@ Batteries included ready to use development environment for Laravel.
2929
- [pint](https://github.com/laravel/pint): PHP code style fixer (PHP-CS Fixer wrapper).
3030
- [pest](https://github.com/pestphp/pest): Pest is an elegant PHP Testing Framework with a focus on simplicity.
3131

32+
## Preinstalled mix packages
33+
34+
- [browser-sync](https://github.com/Browsersync/browser-sync): Keep multiple browsers & devices in sync when building apps.
35+
- First, you must run `php artisan serve` to start the server. Then run `npm run watch` to watch for changes. Browsersync listens to laravel app 8000 port and exposes it to your browser at `localhost:3000` and Browsersync UI `localhost:3001` ports.
36+
3237
## Artisan Commands
3338

3439
<details>

src/package-lock.json

Lines changed: 7601 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
},
1212
"devDependencies": {
1313
"axios": "^0.25",
14-
"laravel-mix": "^6.0.6",
14+
"browser-sync": "^2.27.10",
15+
"browser-sync-webpack-plugin": "^2.3.0",
16+
"laravel-mix": "^6.0.49",
1517
"lodash": "^4.17.19",
16-
"postcss": "^8.1.14"
18+
"postcss": "^8.1.14",
19+
"webpack-cli": "^4.10.0"
1720
}
1821
}

src/public/mix-manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"/dist/js/app.js": "/dist/js/app.js",
3+
"/dist/css/app.css": "/dist/css/app.css"
4+
}

src/resources/views/welcome.blade.php

Lines changed: 542 additions & 102 deletions
Large diffs are not rendered by default.

src/webpack.mix.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
const mix = require('laravel-mix');
1+
const mix = require("laravel-mix");
2+
3+
mix.browserSync({ proxy: "localhost:8000" });
24

35
/*
46
|--------------------------------------------------------------------------
@@ -11,7 +13,8 @@ const mix = require('laravel-mix');
1113
|
1214
*/
1315

14-
mix.js('resources/js/app.js', 'public/js')
15-
.postCss('resources/css/app.css', 'public/css', [
16+
mix.js("resources/js/app.js", "public/dist/js")
17+
.postCss("resources/css/app.css", "public/dist/css", [
1618
//
17-
]);
19+
])
20+
.disableNotifications();

0 commit comments

Comments
 (0)