Skip to content

Commit

Permalink
feat: add parameter to skip theme compilation after storefront build
Browse files Browse the repository at this point in the history
  • Loading branch information
M-arcus committed Nov 6, 2023
1 parent c16e601 commit fe1c82e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/project/project_storefront_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ var projectStorefrontBuildCmd = &cobra.Command{
return err
}

skipThemeCompile, _ := cmd.PersistentFlags().GetBool("skip-theme-compile")
if skipThemeCompile {
return nil
}

return runTransparentCommand(commandWithRoot(exec.CommandContext(cmd.Context(), "php", "bin/console", "theme:compile"), projectRoot))
},
}

func init() {
projectRootCmd.AddCommand(projectStorefrontBuildCmd)
projectStorefrontBuildCmd.PersistentFlags().Bool("skip-theme-compile", false, "Skip theme compilation")
}
4 changes: 4 additions & 0 deletions wiki/docs/commands/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Builds the Administration with all installed extensions

Builds the Storefront with all installed extensions

Parameters:

* `skip-theme-compile` - Skips the theme compilation

## shopware-cli project worker

Starts the Shopware worker in background and tails the log
Expand Down

0 comments on commit fe1c82e

Please sign in to comment.