- Install node v10.
- Install all dependencies with
npm install
.
Zendesk apps tools (ZAT) allows the capability to set up local theme preview. To get started:
- Install ruby version 2.4 or later.
- On Linux, use package management system to install ruby and the corresponding version of
ruby-dev
(ie:ruby2.5-dev
if you are on version 2.5.0). - On OS X, use rbenv to install and manage Ruby versions.
- On Windows machines, use RubyInstaller.
Ruby's official site has a clear instruction page as well.
- Once Ruby is successfully installed, install bundler next via
gem install bundler
. - In the root directory of this project, run
bundle install
. - To update to the latest version of ZAT, run
bundle update zendesk_apps_tools
. - Enable API access in Zendesk Support account by going to Admin > Channels > API, make sure to save the auth token.
- Build, then run
bundle exec zat theme preview
in thedist
folder. - At prompt, enter your Zendesk login email with the string
/token
for username. For examplejoe.bloggs@client.com/token
. Use the actual API token for password. - Follow the prompt and navigate to the
Ready
URL to see a local preview of the theme. - Make changes in
src
and run in conjunction with Webpack using thenpm run build:dev
command detailed below to see your live changes reflected.
npm run build
to create adist
folder containing all the necessary minified theme files for Zendesk.npm run build:dev
is meant to be used for development purposes. It will not minify css and javascript for debugging purposes.npm run format
to format files.npm run zip
to zip the theme files, which can be imported into Zendesk.
There are two ways to release a new theme on Zendesk. Either by uploading a zipped theme or by importing the theme via github.
To go into the theme workbench interface, sign into Zendesk Guide as an admin, then go into Custom Design.
- Click on Add Theme and select Import Theme.
- Choose the zipped file and upload.
- Pull the latest changes from the
master
branch into thesandbox
branch. It will trigger a github action that will build the theme and push the output to thesandbox-deploy
branch.
- The process is the same for building the production theme. Update the manifest to a newer version and push all merged updates to the
release
branch. It will trigger a build action to commit the theme to therelease-deploy
branch.
- Click on Add Theme and select Add from Github.
- Enter
rdai10/zendesk
in the first field. - For uploading to sandbox, enter the branch name,
sandbox-deploy
, in the second field. - For uploading to production, enter the branch name,
release-deploy
, in the second field. - Click Import to complete process.
Once a theme has been imported via github, it can be easily updated by clicking on the three-dot icon on the Live Theme and selecting Update from Github. Simply keep the theme settings checkbox checked and click Update.
More information regarding the project can be found in the documentation folder.