Skip to content

Commit 7c7e3cc

Browse files
committed
fix assets building
2 parents 3be5c94 + 2e7949e commit 7c7e3cc

File tree

10 files changed

+144
-60550
lines changed

10 files changed

+144
-60550
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Laravel 5.5+ mail logger and viewer
22
### Easily log and view and search in browser outgoing emails.
33

4-
This package gives an ability to log all outgoing emails to a database and view them all from a browser.
4+
This package gives an ability to log all outgoing emails to a database and view them all from a browser like them will be shown in a modern mail clients (gmail, etc.).
55

66
## Installation
77

@@ -29,7 +29,7 @@ This will bootstrap the package into Laravel.
2929
php artisan vendor:publish --provider="MasterRO\MailViewer\Providers\MailViewerServiceProvider"
3030
```
3131

32-
You have to publish _**assets,**_ _configs_ are optional.
32+
You have to publish _**assets,**_ and _**views,**_ _configs_ are optional.
3333

3434

3535
### Step 4: Run migrations

mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"/src/public/js/app.js": "/src/public/js/app.js",
2+
"/C:/src/public/js/app.js": "/C:/src/public/js/app.js",
33
"/src/public/css/app.css": "/src/public/css/app.css"
44
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"watch-poll": "npm run watch -- --watch-poll",
88
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
99
"prod": "npm run production",
10+
"build": "npm run production",
1011
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
1112
},
1213
"devDependencies": {

src/app/Providers/MailViewerServiceProvider.php

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,24 @@ public function boot()
2929
{
3030
parent::boot();
3131

32+
$this->publish();
33+
34+
$this->mergeConfigFrom(
35+
__DIR__ . '/../../config/mail-viewer.php', 'mail-viewer'
36+
);
37+
38+
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/');
39+
40+
$this->loadRoutesFrom(__DIR__ . '/../../resources/routes/web.php');
41+
42+
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'mail-viewer');
43+
}
44+
45+
/**
46+
* Publish config, views and assets
47+
*/
48+
protected function publish()
49+
{
3250
$this->publishes([
3351
__DIR__ . '/../../config/mail-viewer.php' => config_path('mail-viewer.php'),
3452
], 'mail-viewer-config');
@@ -37,22 +55,8 @@ public function boot()
3755
__DIR__ . '/../../resources/views' => resource_path('views/vendor/mail-viewer'),
3856
], 'mail-viewer-views');
3957

40-
// $this->publishes([
41-
// __DIR__ . '/../../database/migrations/' => database_path('migrations'),
42-
// ], 'migrations');
43-
44-
$this->mergeConfigFrom(
45-
__DIR__ . '/../../config/mail-viewer.php', 'mail-viewer'
46-
);
47-
4858
$this->publishes([
4959
__DIR__ . '/../../public/' => public_path('vendor/mail-viewer'),
5060
], 'mail-viewer-assets');
51-
52-
$this->loadMigrationsFrom(__DIR__ . '/../../database/migrations/');
53-
54-
$this->loadRoutesFrom(__DIR__ . '/../../resources/routes/web.php');
55-
56-
$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'mail-viewer');
5761
}
5862
}

0 commit comments

Comments
 (0)