You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/web/plugins
moonrailgun c558839f06 refactor: plugin icon and manual install button 3 years ago
..
com.msgbyte.bbcode feat: bbcode 增加代码解析 3 years ago
com.msgbyte.intro refactor: 增加引导插件欢迎语 3 years ago
com.msgbyte.miaolang feat: 增加喵语发送功能 4 years ago
com.msgbyte.notify fix: 修复插件编译问题 3 years ago
com.msgbyte.theme.genshin refactor: plugin icon and manual install button 3 years ago
com.msgbyte.theme.miku refactor: miku 主题增加内容背景 3 years ago
com.msgbyte.webview feat: 为插件提供翻译机制 3 years ago
README.md
install.js chore: 优化plugin install 4 years ago

README.md

如何创建一个插件

内部插件

内部插件是指随 tailchat 分发而提供的插件

在web目录执行:

yarn ministar createPlugin 

插件名请准守反域名模式, 如: com.msgbyte.xxx

设置tsconfig.json如下:

{
  "compilerOptions": {
    "rootDir": "./src",
    "baseUrl": "./src",
    "esModuleInterop": true,
    "jsx": "react",
    "paths": {
      "@capital/*": ["../../../src/plugin/*"],
    }
  }
}

创建一个manifest.json文件

示例:

{
  "label": "网页面板插件",
  "name": "com.msgbyte.webview",
  "url": "/plugins/com.msgbyte.webview/index.js",
  "version": "0.0.0",
  "author": "msgbyte",
  "description": "为群组提供创建网页面板的功能",
  "requireRestart": false
}