- Node.js
- NPM (Node Package Manager)
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js is required.
If this is a brand new project, make sure to create a package.json first with
the npm init command.
or if yarn is used, with yarn init command.
Installation is done using the
npm install command:
$ npm i -g zid-themeInstallation is done using the
yarn add command:
$ yarn add global zid-themeThe following structure is the valid theme SDK structure that has to be followed, othewise an error will be thrown. All the mentioned files and folders are required, and folders can be empty (Such as modules, locals, assets)
See here for accepted assets extension
$ 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
['.js','.ts','.css','.scss','.map','.png','.jpg','.jpeg','.gif','.svg','.woff','.woff2','.otf','.ttf','.eot']Running the build command only without arguments, will assume the current path is where the theme exist, and the theme zip will be named after the root directory name
$ zid-theme buildThe following command takes two arguments --path and --name
$ zid-theme build --path ./theme_path$ zid-theme build --name best-theme-ever$ zid-theme build --name best-theme-ever --path .