compileWithHardhat moved to compileTab

pull/1202/head
aniket-engg 4 years ago committed by Aniket
parent d311842fde
commit 06e0fc129c
  1. 6
      apps/remix-ide/src/app/files/fileManager.js
  2. 4
      apps/remix-ide/src/app/tabs/compileTab/compileTab.js

@ -57,12 +57,6 @@ class FileManager extends Plugin {
this.mode = mode this.mode = mode
} }
async compileWithHardhat (fileContent) {
const configFilePath = 'remixCompiler.config.js'
this.setFileContent(configFilePath, fileContent)
return await this.appManager.call('hardhat', 'compile', configFilePath)
}
limitPluginScope (path) { limitPluginScope (path) {
return path.replace(/^\/browser\//, '').replace(/^browser\//, '') // forbids plugin to access the root filesystem return path.replace(/^\/browser\//, '').replace(/^browser\//, '') // forbids plugin to access the root filesystem
} }

@ -98,7 +98,9 @@ class CompileTab {
} }
} }
` `
this.fileManager.compileWithHardhat(fileContent).then(console.log) const configFilePath = 'remix-compiler.config.js'
this.fileManager.setFileContent(configFilePath, fileContent)
this.fileManager.appManager.call('hardhat', 'compile', configFilePath)
} }
this.fileManager.saveCurrentFile() this.fileManager.saveCurrentFile()
this.miscApi.clearAnnotations() this.miscApi.clearAnnotations()

Loading…
Cancel
Save