Skip to content

Commit

Permalink
Load commands in service provider instead of config
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 24, 2022
1 parent 2c29bd2 commit 46397fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
10 changes: 1 addition & 9 deletions config/commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,7 @@
*/

'add' => [
Hyde\Framework\Commands\BuildStaticSiteCommand::class,
Hyde\Framework\Commands\Debug::class,
Hyde\Framework\Commands\MakePostCommand::class,
Hyde\Framework\Commands\MakeValidatorCommand::class,
Hyde\Framework\Commands\HydePublishViewsCommand::class,
Hyde\Framework\Commands\HydePublishConfigsCommand::class,
Hyde\Framework\Commands\HydePublishHomepageCommand::class,
Hyde\Framework\Commands\HydeInstallerCommand::class,
Hyde\Framework\Commands\Validate::class,
//
],

/*
Expand Down
13 changes: 13 additions & 0 deletions src/HydeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ function () {
return InstalledVersions::getVersion('hyde/framework') ?: 'unreleased';
}
);

$this->commands([
Commands\HydePublishHomepageCommand::class,
Commands\HydePublishConfigsCommand::class,
Commands\HydePublishViewsCommand::class,
Commands\BuildStaticSiteCommand::class,
Commands\HydeInstallerCommand::class,
Commands\MakeValidatorCommand::class,
Commands\PublishStubsCommand::class,
Commands\MakePostCommand::class,
Commands\Validate::class,
Commands\Debug::class,
]);
}

/**
Expand Down

0 comments on commit 46397fd

Please sign in to comment.