diff --git a/CHANGELOG.md b/CHANGELOG.md index e2d982f6..5474bfc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to `ignition` will be documented in this file +## 1.8.1 - 2019-09-20 + +- Revert javascript assets via URL - Fixes #161 + ## 1.8.0 - 2019-09-18 - added solution for running Laravel Dusk in production (#121) diff --git a/resources/views/errorPage.php b/resources/views/errorPage.php index f8a585d5..1ff9edc4 100644 --- a/resources/views/errorPage.php +++ b/resources/views/errorPage.php @@ -21,8 +21,6 @@ - -
@@ -44,6 +42,7 @@ + diff --git a/src/ErrorPage/ErrorPageViewModel.php b/src/ErrorPage/ErrorPageViewModel.php index 5fc14146..a7046085 100644 --- a/src/ErrorPage/ErrorPageViewModel.php +++ b/src/ErrorPage/ErrorPageViewModel.php @@ -121,6 +121,13 @@ public function jsonEncode($data): string return json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR | $jsonOptions); } + public function getAssetContents(string $asset): string + { + $assetPath = __DIR__."/../../resources/compiled/{$asset}"; + + return file_get_contents($assetPath); + } + public function styles(): array { return array_keys(Ignition::styles()); @@ -151,6 +158,7 @@ public function toArray(): array 'scripts' => $this->scripts(), 'tabs' => $this->tabs(), 'jsonEncode' => Closure::fromCallable([$this, 'jsonEncode']), + 'getAssetContents' => Closure::fromCallable([$this, 'getAssetContents']), ]; } } diff --git a/src/Http/Controllers/IgnitionAssetsController.php b/src/Http/Controllers/IgnitionAssetsController.php deleted file mode 100644 index f4164bd6..00000000 --- a/src/Http/Controllers/IgnitionAssetsController.php +++ /dev/null @@ -1,17 +0,0 @@ - 'application/javascript', - ]); - } -} diff --git a/src/IgnitionServiceProvider.php b/src/IgnitionServiceProvider.php index 9ef5bae4..b05f2f1e 100644 --- a/src/IgnitionServiceProvider.php +++ b/src/IgnitionServiceProvider.php @@ -38,7 +38,6 @@ use Illuminate\View\Engines\PhpEngine as LaravelPhpEngine; use Facade\Ignition\Http\Controllers\HealthCheckController; use Facade\Ignition\Http\Controllers\ShareReportController; -use Facade\Ignition\Http\Controllers\IgnitionAssetsController; use Facade\Ignition\Http\Controllers\ExecuteSolutionController; use Facade\Ignition\SolutionProviders\SolutionProviderRepository; use Facade\Ignition\SolutionProviders\ViewNotFoundSolutionProvider; @@ -131,7 +130,6 @@ protected function registerHousekeepingRoutes() Route::post('execute-solution', ExecuteSolutionController::class); Route::post('share-report', ShareReportController::class); - Route::get('assets', IgnitionAssetsController::class); Route::get('scripts/{script}', ScriptController::class); Route::get('styles/{style}', StyleController::class); });