What's the difference between weltpixel:css:generate and setup:static-content:deploy?
What's the difference between weltpixel:css:generate and setup:static-content:deploy? I see that there is some overlap in their functionality. But, are there any differences that I should watch out for?
Also, when in developer mode, do all static assets generate properly on the fly?
I ask because we are seeing some difference in behavior between developer and production mode. I want to verify the proper procedure in both cases.
-
Official commentThe weltpixel:css:generate command is specific to the LESS/CSS generation process for the core theme modules:-Design Elements-Frontend Options-Product Page-Category Page-Custom Header-Custom FooterThe LESS/CSS generation commands have no impact on the Magento Static Content, which the setup:static-content:deploy command handles. The LESS/CSS generation commands are optional for deployment scripts, for example, as the LESS/CSS generation can simply be run from the Magento Admin Cache Management section after the deployment is complete. It's simply advised you add them to your deployment process to save time. The LESS/CSS generation commands should be run after the Static Content Deployment:1. php bin/magento setup:static-content:deploy2. php bin/magento weltpixel:less:generate3. php bin/magento weltpixel:css:generate --store=allThe LESS/CSS regeneration process (either via the Magento Admin or via the Command Line) also needs to be run in developer mode, if Magento Admin option changes are made to any of the modules in the list above for the changes to be reflected on the frontend.More details about how the LESS/CSS generation functions can be found in this article: How the LESS/CSS file generation works in the Pearl ThemeComment actions
-
Dan from WeltPixel answered:
The weltpixel:css:generate command is specific to the LESS/CSS generation process for the core theme modules I mentioned in my previous reply.-Design Elements-Frontend Options-Product Page-Category Page-Custom Header-Custom FooterThe LESS/CSS generation commands have no impact on the Magento Static Content, which the setup:static-content:deploy command handles. The LESS/CSS generation commands are optional for deployment scripts, for example, as the LESS/CSS generation can simply be run from the Magento Admin Cache Management section after the deployment is complete. It's simply advised you add them to your deployment process to save time. The LESS/CSS generation commands should be run after the Static Content Deployment:1. php bin/magento setup:static-content:deploy2. php bin/magento weltpixel:less:generate3. php bin/magento weltpixel:css:generate --store=allThe LESS/CSS regeneration process (either via the Magento Admin or via the Command Line) also needs to be run in developer mode, if Magento Admin option changes are made to any of the modules in the list above for the changes to be reflected on the frontend.I hope that further clarifies this for you! Let me know if there are any other questions.All the best,Dan. -
Today I tried 'php bin/magento weltpixel:css:generate --store=all`
But the CLI returned an error that `-store=all` is not a valid parameter...
Currently needed to do:
sudo -u www-data php bin/magento weltpixel:css:generate --store=default;
sudo -u www-data php bin/magento weltpixel:css:generate --store=us;
sudo -u www-data php bin/magento weltpixel:css:generate --store=au;
sudo -u www-data php bin/magento weltpixel:css:generate --store=ca;
sudo -u www-data php bin/magento weltpixel:css:generate --store=nz;
sudo -u www-data php bin/magento weltpixel:css:generate --store=eu;sudo -u www-data php bin/magento weltpixel:css:generate --store=in;
sudo -u www-data php bin/magento weltpixel:css:generate --store=cn;
Wondering if there is a faster way to speed up :css:generate. -
Thanks for the official comment Weltpixel. However it fails to address my question regarding its invocation via the CLI.
Please can you directly address this question:
------------------------Today I tried 'php bin/magento weltpixel:css:generate --store=all`
But the CLI returned an error that `-store=all` is not a valid parameter...
(This was a parameter given by Weltpixel in a previous response above) -
Thanks for your update, Brad. We ran a quick test of our own and it doesn't seem there are any issues with the --store=all parameter. Here's a screenshot from the CLI, in which we ran both commands required for regenerating the LESS/CSS files:
- (php) bin/magento weltpixel:less:generate
- (php) bin/magento weltpixel:css:generate --store=all
It's worth making sure you ran the command with the double hyphen (--), as your error seems to have a single hyphen. Moreover, ensure you're using the latest version of the theme. If you're on a very old version, it's actually possible the parameter didn't exist in the code.
Please sign in to leave a comment.
Comments
8 comments