Theme Package
Description
build
command compiles and packages your Zid theme into a deployable .zip
file. By default, it assumes the current directory contains the theme and uses the root directory name for the output .zip
file.Usage
Options
Option | Description |
---|---|
--path <directory> | Specify the path to the theme directory. Default: current directory. |
--name <name> | Set a custom name for the output zip file. Default: root folder name. |
Theme Structure Requirements
modules
, locals
, assets
) can be empty.$ root
.
┃
┃─── query.json
┃─── layout.twig
┃─── header.twig
┃─── footer.twig
┃
┃─── templates (accepted extensions: [ '.twig' ])
┃ ┃─── 404.twig
┃ ┃─── home.twig
┃ ┃─── search.twig
┃ ┃─── products.twig
┃ ┃─── product.twig
┃ ┃─── categories.twig
┃ ┃─── category.twig
┃ ┃─── blogs.twig
┃ ┃─── blog.twig
┃ ┃─── faqs.twig
┃ ┃─── cart.twig
┃ ┃─── shipping-and-payments.twig
┃ ┃─── account-addresses.twig
┃ ┃─── account-orders.twig
┃ ┃─── account-profile.twig
┃
┃─── modules (accepted extensions: ['.twig'])
┃
┃─── common (accepted extensions: ['.twig'])
┃
┃─── locals (accepted extensions: ['.json'])
┃
┃─── assets
Directory Specifications
Directory | Purpose | Accepted Extensions |
---|---|---|
templates/ | Contains Twig template files. | .twig |
modules/ | Holds reusable module templates. | .twig |
common/ | Common template parts. | .twig |
locals/ | Localization files. | .json |
assets/ | Theme assets. | See Assets Accepted Extensions below. |
Assets Accepted Extensions
Extension Types | Examples |
---|---|
JavaScript | .js , .ts |
CSS/SCSS | .css , .scss , .map |
Images | .png , .jpg , .jpeg , .gif , .svg |
Fonts | .woff , .woff2 , .otf , .ttf , .eot |
Examples
Build the theme in the current directory
Build the theme from a specific path
Build the theme with a custom output name
Full command with custom path and name
Important Notes
--name
is specified, the output .zip
file will be named after the root directory..zip
file before deployment.Learn More
Modified at 2 months ago