Extensions Tools
This section provides an in-depth guide to using our powerful Extensions Tools. These tools are designed to help you build, debug, and manage custom extensions for our platform seamlessly.
What are Extensions?
Extensions are custom modules that can extend the functionality of our core application. They allow you to integrate with third-party services, automate workflows, and tailor the user experience to your specific needs.
Core Concepts
- Extension Manifest (
manifest.json
): Every extension must have a manifest file that describes its properties, dependencies, permissions, and entry points. - Extension Points: Specific locations within the application where your extension can hook into and provide custom UI or logic.
- API Access: Extensions have controlled access to our platform's APIs to interact with data and perform actions.
- Permissions: A system for granting extensions specific privileges, ensuring security and user control.
Getting Started with Extension Development
To start developing your own extensions, you'll need to set up your development environment. We recommend using our CLI tool for scaffolding new projects.
your-cli-tool create extension my-awesome-extension
to generate a new extension project structure.
Manifest File Structure
The manifest.json
file is the heart of your extension. Here's a typical structure:
{
"name": "My Awesome Extension",
"version": "1.0.0",
"description": "An example extension that adds a new feature.",
"author": "Your Name",
"permissions": [
"read:settings",
"write:data"
],
"entryPoints": {
"main": "dist/main.js",
"ui": "dist/ui.js"
},
"icon": "assets/icon.png"
}
Extension API
Our Extension API provides a rich set of functions to interact with the application. You can access it within your extension's JavaScript code.
app.getData(resource)
: Fetches data from a specified resource.app.setData(resource, data)
: Saves data to a specified resource.app.showNotification(message, type)
: Displays a user notification.app.registerExtensionPoint(pointName, handler)
: Registers a handler for a specific extension point.
For a comprehensive list of available API methods and their usage, please refer to the API Reference.
Debugging Extensions
Debugging is crucial for a smooth development process. You can leverage browser developer tools or our dedicated debugger tool.
Steps to Debug:
- Ensure your extension is loaded in development mode.
- Open your browser's developer console.
- Set breakpoints in your extension's code files.
- Interact with your extension to trigger the code paths you want to debug.
Packaging and Distribution
Once your extension is ready, you can package it for distribution. Our CLI tool can help you create a distributable archive.
Use the command your-cli-tool package extension ./path/to/your/extension --output ./build
to create a deployable package.