Theme engine is a cross platform application that makes it easy to develop ShopWired themes in your local environment.
Download the tool and after some minor configuration you’ll be ready to start creating ShopWired themes with ease.
Using Theme engine will enable you to:
Install theme engine using the command shown below:
npm install -g https://s3-eu-west-1.amazonaws.com/shopwired-resources/shopwired-theme.tgz
NPM is a cross platform command, but administrative permissions might be required on all platforms. Under Linux sudo should be used, e.g. sudo npm install -g...
To use theme engine you will first need to authorise access. Your API key and API secret are available through your account. Follow this guide to obtaining your API keys.
Login to your account to get your theme ID.
Once logged in, navigate to your installed themes. Hover your mouse pointer over the duplicate theme button on your chosen theme. Note the digits after the last forward slash in your browsers task bar; this is your theme ID.
For example: https://v5.shopwired.co.uk/theme/duplicating/29826
Using your API credentials and theme ID in place of X, Y, and Z, run the following command:
shopwired-theme config --api-key X --api-secret Y --theme-id Z
Create a directory for your theme and navigate to the directory.
Running the config command creates a config.json
file in the local directory. The config file can be edited if required.
{
"apiKey": "...",
"apiSecret": "...",
"themeId": ...,
"ignored": ["config.json", "package.json", "bower.json", "node_modules"]
}
Download all of your theme files to the local directory:
shopwired-theme download
Upload theme files to your ShopWired account:
shopwired-theme upload
Specify the name of each file after the command, e.g.
shopwired-theme upload home.twig product.twig
The watch command tells Theme Engine to listen for changes to your theme and automatically upload the added or modified files to your ShopWired account:
shopwired-theme watch
Use the remove command to remove theme files.
shopwired-theme remove