Skip to content

Commit

Permalink
initi
Browse files Browse the repository at this point in the history
  • Loading branch information
iruzevic committed May 14, 2024
1 parent 8a3e496 commit bcbac41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/Init/InitThemeCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ public function __invoke(array $args, array $assocArgs)
{
$assocArgs = $this->prepareArgs($assocArgs);

$assocArgs[self::ARG_GROUP_OUTPUT] = false;

$groupOutput = $assocArgs[self::ARG_GROUP_OUTPUT];

$this->getIntroText($assocArgs);

foreach (static::COMMANDS as $item) {
Expand All @@ -119,7 +115,7 @@ public function __invoke(array $args, array $assocArgs)
);
}

if (!$groupOutput) {
if (!$assocArgs[self::ARG_GROUP_OUTPUT]) {
$this->cliLogAlert(
'All the files have been copied, you can start working on your awesome theme!',
'success',
Expand Down
11 changes: 10 additions & 1 deletion src/Init/InitThemeSetupCli.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,16 @@ public function __invoke(array $args, array $assocArgs)
WP_CLI::runcommand('theme activate ' . $assocArgs[self::ARG_TEXTDOMAIN]);
$this->cliLog('--------------------------------------------------', 'C');
$this->cliLog("Installing theme service classes and blocks", 'C');
WP_CLI::runcommand(\sprintf("boilerplate init theme --%s=true", self::ARG_GROUP_OUTPUT));
$this->runCliCommand(
InitThemeCli::class,
$this->commandParentName,
array_merge(
$assocArgs,
[
self::ARG_GROUP_OUTPUT => true,
]
)
);
$this->cliLog('--------------------------------------------------', 'C');
$this->cliLog("Building the new theme assets", 'C');
WP_CLI::runcommand("eval 'shell_exec(\"cd {$newDestionation} && npm run build\");'");
Expand Down

0 comments on commit bcbac41

Please sign in to comment.