Packaging your theme
By default, all themes should be compressed in ZIP format and contain only the root directory of the component developed, excluding any file and directory that is not part of the standard structure.
The following command shows the compression standard used in Magento 2 components:
zip -r vendor-name_package-name-1.0.0.zip package-path/* -x 'package-path/.git/*'
Here, the name of the ZIP file has the following components:
- vendor: This symbolizes the vendor by which the theme was developed
- name_package: This is the package name
- name: This is the component name
- 1.0.0: This is the component version
After formatting the component name, it defines which directory will be compressed, followed by the -x
parameter, which excludes the git
directory from the theme compression.
How about applying ZIP compression on the Bookstore theme? To do this, follow these steps:
- Using a terminal or Command Prompt, access the theme's root directory:
<magento_root>/app/design/frontend...