diff --git a/Console/DeployManifest.php b/Console/DeployManifest.php new file mode 100644 index 0000000..b830c1f --- /dev/null +++ b/Console/DeployManifest.php @@ -0,0 +1,52 @@ +generate(); + File::put(public_path("manifest.json"), json_encode($output, JSON_PRETTY_PRINT)); + + $this->line('manifest.json file has been created.'); + + } + + +} diff --git a/Providers/LaravelPWAServiceProvider.php b/Providers/LaravelPWAServiceProvider.php index 4704990..7356635 100644 --- a/Providers/LaravelPWAServiceProvider.php +++ b/Providers/LaravelPWAServiceProvider.php @@ -27,6 +27,7 @@ public function boot() $this->registerViews(); $this->registerServiceworker(); $this->registerDirective(); + $this->registerCommands(); } /** @@ -118,7 +119,19 @@ public function registerDirective() }); } - + + /** + * Register the available commands + * + * @return void + */ + public function registerCommands() + { + $this->commands([ + \LaravelPWA\Console\Commands\DeployManifest::class, + ]); + + } /** * Get the services provided by the provider.