FIX: minor fixes in installation
This commit is contained in:
@@ -12,7 +12,7 @@ class SetTemplate extends Command
|
||||
* The name and signature of the console command.
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'template:set {template}';
|
||||
protected $signature = 'template:set {template} {publish?}';
|
||||
/**
|
||||
* The console command description.
|
||||
* @var string
|
||||
@@ -26,6 +26,7 @@ class SetTemplate extends Command
|
||||
public function handle()
|
||||
{
|
||||
$template = $this->argument('template');
|
||||
$publish = $this->argument('publish') !== 'no-publish';
|
||||
|
||||
$templatePath = app_path('../templates/' . $template);
|
||||
if (!is_dir($templatePath) || !file_exists($templatePath . '/config.php')) {
|
||||
@@ -64,11 +65,14 @@ class SetTemplate extends Command
|
||||
|
||||
// theme written
|
||||
$this->line('Template successfully set up.');
|
||||
$this->line('');
|
||||
$this->line(' ** PUBLISHING ASSETS AND VIEWS **');
|
||||
// publish assets and views for module and theme
|
||||
$this->call('vendor:publish', ['--tag' => ['public-assets'], '--force' => true]);
|
||||
$this->call('vendor:publish', ['--tag' => ['module-views'], '--force' => true]);
|
||||
$this->call('vendor:publish');
|
||||
|
||||
if ($publish) {
|
||||
$this->line('');
|
||||
$this->line(' ** PUBLISHING ASSETS AND VIEWS **');
|
||||
// publish assets and views for module and theme
|
||||
$this->call('vendor:publish');
|
||||
$this->call('vendor:publish', ['--tag' => ['public-assets'], '--force' => true]);
|
||||
$this->call('vendor:publish', ['--tag' => ['module-views'], '--force' => true]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user