diff --git a/apps/remix-ide/src/app/panels/terminal.js b/apps/remix-ide/src/app/panels/terminal.js index bd474b41fb..4c7dd94f75 100644 --- a/apps/remix-ide/src/app/panels/terminal.js +++ b/apps/remix-ide/src/app/panels/terminal.js @@ -93,6 +93,9 @@ class Terminal extends Plugin { } onActivation () { + this.on('solidity-logic', 'hardhatCompilationFinished', (msg) => { + this.commands.log.apply(this.commands, [msg]) + }) this.on('scriptRunner', 'log', (msg) => { this.commands.log.apply(this.commands, msg.data) }) diff --git a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js index 1e5de9d5c7..1acd2eb785 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compileTab.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compileTab.js @@ -109,7 +109,11 @@ class CompileTab extends Plugin { ` const configFilePath = 'remix-compiler.config.js' this.fileManager.setFileContent(configFilePath, fileContent) - this.call('hardhat', 'compile', configFilePath) + this.call('hardhat', 'compile', configFilePath).then((result) => { + this.emit('hardhatCompilationFinished', result) + }).catch((error) => { + this.emit('hardhatCompilationFinished', error) + }) } this.fileManager.saveCurrentFile() this.call('editor', 'clearAnnotations')