diff --git a/resources/views/json-editor.blade.php b/resources/views/json-editor.blade.php index 0347928..e521a32 100644 --- a/resources/views/json-editor.blade.php +++ b/resources/views/json-editor.blade.php @@ -1,52 +1,64 @@ -
-
+
-
- + \ No newline at end of file diff --git a/src/FilamentJsoneditorServiceProvider.php b/src/FilamentJsoneditorServiceProvider.php index d508fad..13341dd 100644 --- a/src/FilamentJsoneditorServiceProvider.php +++ b/src/FilamentJsoneditorServiceProvider.php @@ -22,14 +22,18 @@ public function configurePackage(Package $package): void $this->publishes([ __DIR__ . '/../dist/jsoneditor/img/jsoneditor-icons.svg' => public_path('css/awcodes/headings/img/jsoneditor-icons.svg'), - ], 'filament-jsoneditor-img'); + __DIR__ . '/../dist/jsoneditor/jsoneditor.min.css' => public_path('css/awcodes/headings/jsoneditor.min.css'), + __DIR__ . '/../dist/jsoneditor/jsoneditor.min.js' => public_path('js/awcodes/headings/jsoneditor.min.js'), + ], 'filament-jsoneditor'); } - public function packageBooted(): void + public function packageRegistered(): void { - FilamentAsset::register([ - Css::make('invaders-filament-jsoneditor', __DIR__ . '/../dist/jsoneditor/jsoneditor.min.css'), - Js::make('invaders-filament-jsoneditor', __DIR__ . '/../dist/jsoneditor/jsoneditor.min.js'), - ], 'awcodes/headings'); + if ($this->app->runningInConsole()) { + FilamentAsset::register([ + Css::make('invaders-filament-jsoneditor', __DIR__ . '/../dist/jsoneditor/jsoneditor.min.css'), + Js::make('invaders-filament-jsoneditor', __DIR__ . '/../dist/jsoneditor/jsoneditor.min.js'), + ], 'awcodes/headings'); + } } }