|
|
@ -18,7 +18,7 @@ export class DocGenClient extends PluginClient { |
|
|
|
this.eventEmitter = new EventEmitter() |
|
|
|
this.eventEmitter = new EventEmitter() |
|
|
|
createClient(this) |
|
|
|
createClient(this) |
|
|
|
// this.docgen = new DocGen()
|
|
|
|
// this.docgen = new DocGen()
|
|
|
|
this.methods = ['generateDocs', 'publishDocs'] |
|
|
|
this.methods = ['generateDocs', 'publishDocs', 'viewDocs'] |
|
|
|
this.onload().then(async () => { |
|
|
|
this.onload().then(async () => { |
|
|
|
console.log('docgen client loaded') |
|
|
|
console.log('docgen client loaded') |
|
|
|
await this.setListeners() |
|
|
|
await this.setListeners() |
|
|
@ -26,7 +26,8 @@ export class DocGenClient extends PluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async setListeners() { |
|
|
|
async setListeners() { |
|
|
|
this.currentTheme = await this.call('theme', 'currentTheme'); |
|
|
|
this.currentTheme = await this.call('theme', 'currentTheme') |
|
|
|
|
|
|
|
|
|
|
|
this.on("theme", "themeChanged", (theme: any) => { |
|
|
|
this.on("theme", "themeChanged", (theme: any) => { |
|
|
|
this.currentTheme = theme |
|
|
|
this.currentTheme = theme |
|
|
|
this.eventEmitter.emit('themeChanged', this.currentTheme) |
|
|
|
this.eventEmitter.emit('themeChanged', this.currentTheme) |
|
|
@ -64,6 +65,17 @@ export class DocGenClient extends PluginClient { |
|
|
|
this.eventEmitter.emit('docsGenerated', docs) |
|
|
|
this.eventEmitter.emit('docsGenerated', docs) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async opendDocs() { |
|
|
|
|
|
|
|
console.log('docgen client openDocs') |
|
|
|
|
|
|
|
await this.call('manager', 'activatePlugin', 'docgenviewer') |
|
|
|
|
|
|
|
await this.call('tabs' as any, 'focus', 'docgenviewer') |
|
|
|
|
|
|
|
await this.call('docgenviewer' as any, 'viewDocs') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async viewDocs(docs: string[]) { |
|
|
|
|
|
|
|
console.log('docgen client viewDocs') |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async generateDocs() { |
|
|
|
async generateDocs() { |
|
|
|
console.log('docgen client generateDocs') |
|
|
|
console.log('docgen client generateDocs') |
|
|
|
this.docgen([this.build]) |
|
|
|
this.docgen([this.build]) |
|
|
|