Create Extension
For creating an extension (App) follow the steps below :
- Open the Command prompt, and run the command ZET init to create a new project.
Platform@Platform Extensions ~ % zet init ? Select the Zoho service for your widget and hit enter key (Use arrow keys) Zoho CRM Catalyst Zoho Projects ❯ Zoho Desk Zoho Orchestly Zoho Mail Zoho Creator (Move up and down to reveal more choices)
- Select a Zoho Service.
Here, choose Zoho Desk as the service using the arrow keys. - Enter Name for the extension which you want to create.
Platform@Platform Extensions ~ % zet init ? Select the Zoho service for your widget and hit enter key Zoho Desk ? Project Name demoproject
- Choose whether you need a Module Support or not. By giving module support as Yes, you can build your app including NPM packages. And you will also get the in-built structure for react app.
Platform@Platform Extensions ~ % zet init ? Select the Zoho service for your widget and hit enter key Zoho Desk ? Project Name demoproject ? Need Module Support (Use arrow keys) Yes ❯No
- Press Enter.
Platform@Platform Extensions ~ % sudo zet init ? Select the Zoho service for your widget and hit enter key Zoho Desk ? Project Name demoproject ? Need Module Support No Initializing project at: /Users/Platform/Extensions/demoproject Installing NPM dependencies... Project Initialized /Users/Platform/Extensions/demoproject Run the following commands: cd 'demoproject' zet run Platform@Platform Extensions ~ %
Now, the project folder will be created with the given project name, necessary directories, and files in your local drive as given below.
Important Folders/Files given in the above folder structure are explained below:
Folder/File | Description |
/app | This folder contains all the files required for building an application. |
/app/translations | This folder contains all the translation files required to render the application in different languages. To know more about translations, click here. |
/app/widget.html | The "app" folder contains files for rendering the app's user interface. "widget.html" serves as the initial landing page when the app is opened. |
/src/index.js | When module support is true, index.js file serves as the entry point for app's execution. |
plugin-manifest.json | The plugin-manifest.json file is used to store all configurations of the app. To learn more about Plugin-manifest.json and its keys, click here . |
resources.json | Resource.json is used to add resources such as fields, webhooks, channels, and more to your app. |