Getting Started
Prerequisites
- Ensure that Node.js (18 or above) and npm are installed on your system.
- Recommended IDE: Use VS Code along with the Svelte extension.
- You will need a Zoho Desk account to test your extension and a Sigma account to publish it on the Zoho Marketplace.
Installation
- Clone the template repository and install the necessary packages.
- The template is pre-configured with Deskblocks, TypeScript definitions, and other essential utilities.
git clone https://github.com/imohanvadivel/desk-ext-template.git
cd desk-ext-template
npm i
Testing
- Before testing your extension, make sure that developer mode is enabled in Zoho Desk.
- You can start the development server by running:
# Starts the server on port 5000
npm run dev
- Your extension should now be visible inside Desk in the placeholder location specified in the plugin-manifest.json file.
- Now that all the scaffolding is done, go ahead and build the rest of the extension :)
Note:
The first time you run the server, you may need to grant sudo permissions to generate a TSL certificate, as the development server runs over HTTPS protocol.
Bundling
- Once you’ve built your extension, you can bundle the code by running:
# Bundles the project and generates a zip file in the dist folder
npm run build
- After bundling, you’ll find the packaged zip file (ext.zip) in the dist folder. This file can be uploaded to Sigma to publish your extension.
Miscellaneous
- The plugin-manifest.json, resources.json, and localization files are located in the public directory. Adjust these files according to your project requirements.
- Place static assets (such as images) in the assets folder inside the public directory. And you can reference them in your code like this:
<img src="assets/img.png" />