Commit 5661e5e6 authored by aniket-engg's avatar aniket-engg Committed by Aniket

show hh compilation result in terminal

parent 8ab295d9
...@@ -93,6 +93,9 @@ class Terminal extends Plugin { ...@@ -93,6 +93,9 @@ class Terminal extends Plugin {
} }
onActivation () { onActivation () {
this.on('solidity-logic', 'hardhatCompilationFinished', (msg) => {
this.commands.log.apply(this.commands, [msg])
})
this.on('scriptRunner', 'log', (msg) => { this.on('scriptRunner', 'log', (msg) => {
this.commands.log.apply(this.commands, msg.data) this.commands.log.apply(this.commands, msg.data)
}) })
......
...@@ -109,7 +109,11 @@ class CompileTab extends Plugin { ...@@ -109,7 +109,11 @@ class CompileTab extends Plugin {
` `
const configFilePath = 'remix-compiler.config.js' const configFilePath = 'remix-compiler.config.js'
this.fileManager.setFileContent(configFilePath, fileContent) 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.fileManager.saveCurrentFile()
this.call('editor', 'clearAnnotations') this.call('editor', 'clearAnnotations')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment