show hh compilation result in terminal

pull/1172/head
aniket-engg 4 years ago committed by Aniket
parent 8ab295d949
commit 5661e5e6e1
  1. 3
      apps/remix-ide/src/app/panels/terminal.js
  2. 6
      apps/remix-ide/src/app/tabs/compileTab/compileTab.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)
})

@ -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')

Loading…
Cancel
Save