Zid Theme Packager
The Zid Theme Packager is a Command-line-interface (CLI) tool for developers to validate and compile Zid themes efficiently. It makes it easy to build your theme files into a compressed ZIP file ready to upload to the Zid platform.
Installation and Initial Setup
To begin using the Zid Theme Packager, install it globally using Node Package Manager (NPM).
npm install -g @zidsa/themes-cli
Note: Installing the Zid Theme Packager globally (
-g
) creates a symlink in your global folder, making it accessible from any directory in your system.
Once installed, you can view all available options and commands:
zid-theme help
To create a new project with the Zid Theme Packager:
Ensure you have Node.js and NPM installed on your system.
Run the following command to initiate a new project:
zid-theme new your-project-name
Supported Assets
The Packager supports the following file types for assets:
- JavaScript files (
.js
,.ts
) - Stylesheets (
.css
,.scss
) - Source maps (
.map
) - Image files (
.png
,.jpg
,.jpeg
,.gif
,.svg
) - Font files (
.woff
,.woff2
,.otf
,.ttf
,.eot
)
Building Your Theme
Using the build
command, the Packager compiles your theme into a distributable ZIP format.
Default Build Behavior
Run the build command in your project directory to compile the theme:
zid-theme build
The output ZIP file is named after your theme's root directory by default.
Custom Build Options
Customize your build with these arguments:
--path
: Set a custom path for your theme.--name
: Assign a custom name to the output ZIP file.
Example with a custom path:
zid-theme build --path ./custom_theme_path
Example with a custom theme name:
zid-theme build --name CustomThemeName
Combining custom path and name:
zid-theme build --name CustomThemeName --path ./custom_theme_path
For more information and advanced usage of the Zid Theme Packager, refer to the GitHub Repository.