0.1.4 • Published 6 years ago

@tukiyomi/plugin-sdk v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

TukiYomi Plugin SDK

A SDK for TukiYomi Browser plugins, yet another Scalable KanColle Browser, written in Typescript, powered by Electron and Vue.

WIP

Undocumented

You may want to see some WIP core plugins, like the Recorder plugin.

Example

import {
  Plugin,
  on,
  getConfig,
  NetworkEvent
} from '@tukiyomi/plugin-sdk'

@Plugin({
  // default configs
  default: {
    demo: true
  }
})
export class MyPlugin {
  @start
  onStart () {
    const isDemo = getConfig('demo') // true
  }

  @on('network')
  @on('kcsapi')
  onNetwork (evt: NetworkEvent) {
    console.log(evt)
  }

  @stop
  onStop () {
    console.log('Bye')
  }
}