Skip to content

Commit f2b5a5f

Browse files
Copilotdermatz
andcommitted
#add-hyva-token-command - Fix variable naming and improve documentation
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
1 parent 0d1ae63 commit f2b5a5f

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ Please ensure that your Magento installation meets this requirement before insta
7979
bin/magento mageforge:theme:watch <theme-code>
8080
```
8181

82-
4. Enjoy automatic CSS rebuilding you work on your theme files!
82+
4. Generate Hyvä design tokens (for Hyvä themes):
83+
84+
```bash
85+
bin/magento mageforge:theme:tokens <theme-code>
86+
```
87+
88+
This creates a `generated/hyva-tokens.css` file from your design tokens configuration.
89+
90+
5. Enjoy automatic CSS rebuilding as you work on your theme files!
8391

8492
## Additional Documentation
8593

src/Console/Command/Theme/TokensCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ protected function executeCommand(InputInterface $input, OutputInterface $output
116116
$this->io->text('Running npx hyva-tokens...');
117117
passthru('npx hyva-tokens', $returnCode);
118118
} else {
119-
exec('npx hyva-tokens 2>&1', $output_lines, $returnCode);
119+
exec('npx hyva-tokens 2>&1', $commandOutput, $returnCode);
120120

121121
if ($returnCode === 0) {
122122
$this->io->success('Hyvä design tokens generated successfully.');
123123
} else {
124124
$this->io->error('Failed to generate Hyvä design tokens.');
125-
if (!empty($output_lines)) {
126-
$this->io->writeln($output_lines);
125+
if (!empty($commandOutput)) {
126+
$this->io->writeln($commandOutput);
127127
}
128128
}
129129
}

0 commit comments

Comments
 (0)