Add solidity compile custom action (#1356)

It doesn't necessarily need to be merged now. I've put some comment regarding the QA document regarding that.

Co-authored-by: bunsenstraat <bunsenstraat@gmail.com>
pull/5370/head
yann300 3 years ago committed by GitHub
parent 03f9c520a1
commit cccf7bfb02
  1. 17
      apps/remix-ide/src/app/tabs/compile-tab.js

@ -33,7 +33,7 @@ const profile = {
location: 'sidePanel',
documentation: 'https://remix-ide.readthedocs.io/en/latest/solidity_editor.html',
version: packageJson.version,
methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig']
methods: ['getCompilationResult', 'compile', 'compileWithParameters', 'setCompilerConfig', 'compileFile']
}
@ -508,6 +508,21 @@ class CompileTab extends ViewPlugin {
onActivation () {
this.call('manager', 'activatePlugin', 'solidity-logic')
this.listenToEvents()
this.call('filePanel', 'registerContextMenuItem', {
id: 'solidity',
name: 'compileFile',
label: 'Compile',
type: [],
extension: ['.sol'],
path: [],
pattern: []
})
}
compileFile (event) {
if (event.path.length > 0) {
this.compileTabLogic.compileFile(event.path[0])
}
}
onDeactivation () {

Loading…
Cancel
Save