@omar-csse/zid-theme v1.0.0
š¦ zid-theme-npm
NPM package to validate and zip the theme folder to match zid custom themes' standards
š Prerequisites:
- Node.js
NPM (Node Package Manager)
āļø Installation
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 install zid-themeInstallation is done using the
yarn add command:
$ yarn add zid-themeš» Usage
The follwoing 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, Empty folders can be empty but have to exist (Such as modules, locals, assets)
See here for accepted assets extension
$ root
.
ā
āāāā query.json
āāāā layout.zid
āāāā header.zid
āāāā footer.zid
ā
āāāā templates (accepted extensions: [ '.zid' ] )
ā āāāā 404.zid
ā āāāā home.zid
ā āāāā search.zid
ā āāāā products.zid
ā āāāā product.zid
ā āāāā categories.zid
ā āāāā category.zid
ā āāāā blogs.zid
ā āāāā blog.zid
ā āāāā faqs.zid
ā āāāā shpping-and-payments.zid
ā āāāā account-addresses.zid
ā āāāā account-orders.zid
ā āāāā account-profile.zid
ā
āāāā modules (accepted extensions: ['.zid', '.html'] )
ā
āāāā common (accepted extensions: ['.zid', '.html'] )
ā
āāāā locals (accepted extensions: ['.json'] )
ā
āāāā assetsassets accepted extensions
['.js','.ts','.css','.scss','.map','.png','.jpg','.jpeg','.gif','.svg','.woff','.woff2','.otf','.ttf','.eot']ā”ļø build command
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 follwoing command takes two arguments --path and --name
To set the path of the theme (default .):
zid-theme build --path ./theme_pathTo set the name of the theme (root folder name):
zid-theme build --name best-theme-everFull command:
zid-theme build --name best-theme-ever --path .License
5 years ago