File tree Expand file tree Collapse file tree
src/Console/Command/Theme Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ protected function configure(): void
4545 ->addArgument (
4646 'themeCodes ' ,
4747 InputArgument::IS_ARRAY ,
48- 'The codes of the theme to build '
48+ 'Theme codes to build (format: Vendor/ theme, Vendor/theme 2, ...) '
4949 )
5050 ->setAliases (['frontend:build ' ]);
5151 }
Original file line number Diff line number Diff line change 99use OpenForgeProject \MageForge \Model \ThemeList ;
1010use OpenForgeProject \MageForge \Model \ThemePath ;
1111use OpenForgeProject \MageForge \Service \ThemeBuilder \BuilderPool ;
12+ use Symfony \Component \Console \Input \InputArgument ;
1213use Symfony \Component \Console \Input \InputInterface ;
1314use Symfony \Component \Console \Input \InputOption ;
1415use Symfony \Component \Console \Output \OutputInterface ;
@@ -38,6 +39,11 @@ protected function configure()
3839 {
3940 $ this ->setName ($ this ->getCommandName ('theme ' , 'watch ' ))
4041 ->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+ )
4147 ->addOption (
4248 'theme ' ,
4349 't ' ,
@@ -52,7 +58,11 @@ protected function configure()
5258 */
5359 protected function executeCommand (InputInterface $ input , OutputInterface $ output ): int
5460 {
55- $ themeCode = $ input ->getOption ('theme ' );
61+ $ themeCode = $ input ->getArgument ('themeCode ' );
62+
63+ if (empty ($ themeCode )) {
64+ $ themeCode = $ input ->getOption ('theme ' );
65+ }
5666
5767 if (empty ($ themeCode )) {
5868 $ themes = $ this ->themeList ->getAllThemes ();
You can’t perform that action at this time.
0 commit comments