add customActionMethod to the list of methods.

pull/3602/head
Joseph Izang 2 years ago committed by Aniket
parent cce7ba674e
commit 34b3987672
  1. 9
      apps/doc-gen/src/app/docgen-client.ts

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { PluginClient } from '@remixproject/plugin'
import { CompilationResult, SourceWithTarget } from '@remixproject/plugin-api'
import { CompilationResult, SourceWithTarget, customAction } from '@remixproject/plugin-api'
import { createClient } from '@remixproject/plugin-webview'
import EventEmitter from 'events'
import { Config, defaults } from './docgen/config'
@ -21,7 +21,7 @@ export class DocGenClient extends PluginClient {
constructor() {
super()
this.eventEmitter = new EventEmitter()
this.methods = ['generateDocs', 'openDocs']
this.methods = ['generateDocs', 'openDocs', 'generateDocsCustomAction']
createClient(this)
this.onload().then(async () => {
await this.setListeners()
@ -55,6 +55,11 @@ export class DocGenClient extends PluginClient {
})
}
async generateDocsCustomAction(action: customAction) {
console.log({ action })
// await this.generateDocs()
}
async docgen(builds: Build[], userConfig?: Config): Promise<void> {
const config = { ...defaults, ...userConfig }
config.sourcesDir = this.contractPath !== config.sourcesDir ? this.contractPath : config.sourcesDir

Loading…
Cancel
Save