Skip to content
Permalink
Browse files

fix(plugin-compile): use correctly bound methods in CompilePlugin

  • Loading branch information
MarshallOfSound committed Jul 5, 2018
1 parent f1b90b6 commit df2acc73db434338675b68909edc71a274260352
Showing with 3 additions and 3 deletions.
  1. +3 −3 packages/plugin/compile/src/CompilePlugin.ts
@@ -8,18 +8,18 @@ export default class LocalElectronPlugin extends PluginBase<CompilePluginConfig>
name = 'electron-compile';
private dir!: string;

init(dir: string) {
init = (dir: string) => {
this.dir = dir;
}

getHook(hookName: string) {
getHook = (hookName: string) => {
if (hookName === 'packageAfterCopy') {
return createCompileHook(this.dir);
}
return null;
}

async startLogic(opts: StartOptions) {
startLogic = async (opts: StartOptions) => {
return [process.execPath, path.resolve(this.dir, 'node_modules/electron-prebuilt-compile/lib/cli')];
}
}

0 comments on commit df2acc7

Please sign in to comment.
You can’t perform that action at this time.