Skip to content

Commit

Permalink
fix: index
Browse files Browse the repository at this point in the history
  • Loading branch information
whes1015 committed Nov 30, 2024
1 parent 9d68189 commit d683e86
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/trem/plugin_dev/start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ example/

擴充套件的入口點

### Class 形式

```js
class Plugin {
#ctx;
Expand All @@ -36,6 +38,16 @@ class Plugin {
module.exports = Plugin;
```

### Function 形式

```js
module.exports = function (ctx) {
ctx.on("load", () => {
const { TREM, logger, MixinManager } = ctx;
});
};
```

## info.json

定義擴充資訊的文件
Expand Down

0 comments on commit d683e86

Please sign in to comment.