Skip to content

ashnaarya/sample-plugin

Repository files navigation

My Plugin

This template provides a starting point for developing custom data visualizations for the Sigma platform using React, TypeScript, and Vite. It includes a minimal setup with the necessary dependencies and project structure to get you started quickly.

Getting Started

Follow these instructions to get the development environment up and running.

Prerequisites

  • Node.js (v24 or later recommended)
  • yarn

Installation

  1. Create a new repository from this template: Click the "Use this template" button at the top of the repository page to create a new repository with the same structure and files.

  2. Install dependencies:

    yarn install

Running the Development Server

To start the Vite development server, run the following command:

yarn dev

This will start the development server, and you can view your plugin in the browser at the URL provided. The server supports Hot Module Replacement (HMR), so changes you make to the code will be reflected in the browser instantly.

Project Structure

Here is an overview of the key files and directories in this template:

  • public/: Contains the static assets for the plugin, such as images and fonts.
  • src/: The main source code directory for the plugin.
    • components/: Contains reusable React components.
    • assets/: Contains assets that are imported directly into the source code.
    • App.tsx: The main application component.
    • main.tsx: The entry point of the application.
  • vite.config.ts: The configuration file for Vite.
  • package.json: The project manifest, containing dependencies and scripts.
  • README.md: This file.

Deployment

This template includes a GitHub Actions workflow to automatically build and deploy the plugin to GitHub Pages. You will need to configure your repo to deploy from the gh-pages branch.

Alternatively, you can deploy to any cloud provider of your choice.

Manual Build

To build the plugin for production, run the following command:

yarn build

This will create a dist/ directory with the production-ready files.

Automated Deployment with GitHub Pages

The repository is configured with a GitHub Actions workflow that automatically deploys the plugin to GitHub Pages whenever you push to the main branch. The deployment will be available at https://<your-username>.github.io/<your-repo-name>/.

  • Select the gh-pages branch to be the deploy target ( it may not exist until the first push )
  • Github Pages require either an Enterprise Github account, or the repository to be public.

Further Information

For more detailed information on developing Sigma plugins, please refer to the official documentation:

About

understanding gh pages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published