File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/Console/Command/Theme Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ protected function configure(): void
45
45
->addArgument (
46
46
'themeCodes ' ,
47
47
InputArgument::IS_ARRAY ,
48
- 'The codes of the theme to build '
48
+ 'Theme codes to build (format: Vendor/ theme, Vendor/theme 2, ...) '
49
49
)
50
50
->setAliases (['frontend:build ' ]);
51
51
}
Original file line number Diff line number Diff line change 9
9
use OpenForgeProject \MageForge \Model \ThemeList ;
10
10
use OpenForgeProject \MageForge \Model \ThemePath ;
11
11
use OpenForgeProject \MageForge \Service \ThemeBuilder \BuilderPool ;
12
+ use Symfony \Component \Console \Input \InputArgument ;
12
13
use Symfony \Component \Console \Input \InputInterface ;
13
14
use Symfony \Component \Console \Input \InputOption ;
14
15
use Symfony \Component \Console \Output \OutputInterface ;
@@ -38,6 +39,11 @@ protected function configure()
38
39
{
39
40
$ this ->setName ($ this ->getCommandName ('theme ' , 'watch ' ))
40
41
->setDescription ('Watches theme files for changes and rebuilds them automatically ' )
42
+ ->addArgument (
43
+ 'themeCode ' ,
44
+ InputArgument::OPTIONAL ,
45
+ 'Theme to watch (format: Vendor/theme) '
46
+ )
41
47
->addOption (
42
48
'theme ' ,
43
49
't ' ,
@@ -52,7 +58,11 @@ protected function configure()
52
58
*/
53
59
protected function executeCommand (InputInterface $ input , OutputInterface $ output ): int
54
60
{
55
- $ themeCode = $ input ->getOption ('theme ' );
61
+ $ themeCode = $ input ->getArgument ('themeCode ' );
62
+
63
+ if (empty ($ themeCode )) {
64
+ $ themeCode = $ input ->getOption ('theme ' );
65
+ }
56
66
57
67
if (empty ($ themeCode )) {
58
68
$ themes = $ this ->themeList ->getAllThemes ();
You can’t perform that action at this time.
0 commit comments