parent
971e4d0265
commit
87f65eeba7
@ -1,13 +1,15 @@ |
|||||||
export interface IElectronAPI { |
export interface IElectronAPI { |
||||||
activatePlugin: (name: string) => Promise<boolean> |
activatePlugin: (name: string) => Promise<boolean> |
||||||
receiveFromFS: (cb: any) => void |
plugins: { |
||||||
sendToFS: (message: Partial<Message>) => void |
name: string |
||||||
receiveFromGit: (cb: any) => void |
activate: () => Promise<boolean> |
||||||
sendToGit: (message: Partial<Message>) => void |
on: (cb: any) => void |
||||||
|
send: (message: Partial<Message>) => void |
||||||
|
}[] |
||||||
} |
} |
||||||
|
|
||||||
declare global { |
declare global { |
||||||
interface Window { |
interface Window { |
||||||
api: IElectronAPI |
electronAPI: IElectronAPI |
||||||
} |
} |
||||||
} |
} |
@ -1,12 +1,7 @@ |
|||||||
<!DOCTYPE html> |
<!DOCTYPE html> |
||||||
<html> |
<html> |
||||||
<head> |
<head> |
||||||
<meta charset="UTF-8" /> |
|
||||||
<title>Hello World!</title> |
|
||||||
|
|
||||||
</head> |
</head> |
||||||
<body> |
<body> |
||||||
<h1>💖 Hello World!</h1> |
|
||||||
<p>Welcome to your Electron application.</p> |
|
||||||
</body> |
</body> |
||||||
</html> |
</html> |
||||||
|
@ -1,16 +1,11 @@ |
|||||||
import { Engine, PluginManager, Plugin, PluginConnector } from '@remixproject/engine'; |
import { ElectronPlugin } from './lib/electronPlugin'; |
||||||
import { Message, Profile } from '@remixproject/plugin-utils'; |
|
||||||
import { ElectronPluginConnector } from './lib/electronPluginConnector'; |
|
||||||
|
|
||||||
export class gitPlugin extends ElectronPluginConnector { |
export class gitPlugin extends ElectronPlugin { |
||||||
constructor(){ |
constructor(){ |
||||||
super({ |
super({ |
||||||
displayName: 'git', |
displayName: 'git', |
||||||
name: 'git', |
name: 'git', |
||||||
description: 'git', |
description: 'git', |
||||||
},{ |
|
||||||
sendAPI: window.api.sendToGit, |
|
||||||
receiveAPI: window.api.receiveFromGit |
|
||||||
}) |
}) |
||||||
this.methods = ['log', 'status', 'add', 'commit', 'push', 'pull', 'clone', 'checkout', 'branch', 'merge', 'reset', 'revert', 'diff', 'stash', 'apply', 'cherryPick', 'rebase', 'tag', 'fetch', 'remote', 'config', 'show', 'init', 'help', 'version'] |
this.methods = ['log', 'status', 'add', 'commit', 'push', 'pull', 'clone', 'checkout', 'branch', 'merge', 'reset', 'revert', 'diff', 'stash', 'apply', 'cherryPick', 'rebase', 'tag', 'fetch', 'remote', 'config', 'show', 'init', 'help', 'version'] |
||||||
} |
} |
||||||
|
Loading…
Reference in new issue