@coffic/buddy-example-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

GitOK Sample Plugin (TypeScript Version)

English 简体中文

This is a sample GitOK plugin developed using TypeScript. Through this example, you can learn how to create GitOK plugins using TypeScript.

Features

  • Complete TypeScript type support
  • Sample action implementations
  • Custom view examples

Directory Structure

.
├── dist/             # Compiled JavaScript files
├── src/              # TypeScript source code
│   ├── index.ts      # Plugin main entry
│   └── types.ts      # TypeScript type definitions
├── views/            # HTML view files
│   ├── calculator.html
│   └── time.html
├── package.json      # Project configuration
└── tsconfig.json     # TypeScript configuration

Development Guide

Install Dependencies

pnpm install

Development Mode

pnpm dev

Build

pnpm build

Plugin Features

This sample plugin provides three basic features:

  1. Greeting - Display a welcome message
  2. Current Time - Show current time (embedded view)
  3. Calculator - Provide a simple calculator (window view)

Type Definitions

The plugin uses TypeScript interfaces to define clear type structures:

  • Plugin - Main plugin interface
  • Action - Action definition interface
  • PluginContext - Plugin context interface

How to Use

  1. Clone the repository
  2. Install dependencies: pnpm install
  3. Build the project: pnpm build
  4. Load this plugin in GitOK application

Links

License

MIT

Package Sidebar

Install

npm i @coffic/buddy-example-plugin

Weekly Downloads

4

Version

1.1.3

License

MIT

Unpacked Size

18.9 kB

Total Files

8

Last publish

Collaborators

  • nookery