only compile sol file

pull/3094/head
yann300 7 years ago
parent 13880cd05e
commit d150b0ccbd
  1. 36
      src/app.js

@ -693,22 +693,26 @@ function run () {
if (transactionDebugger.isActive) return
fileManager.saveCurrentFile()
editor.clearAnnotations()
var currentFile = config.get('currentFile')
if (currentFile) {
var target = currentFile
var sources = {}
var provider = fileManager.fileProviderOf(currentFile)
if (provider) {
provider.get(target, (error, content) => {
if (error) {
console.log(error)
} else {
sources[target] = { content }
compiler.compile(sources, target)
}
})
} else {
console.log('cannot compile ' + currentFile + '. Does not belong to any explorer')
if (/.(.sol)$/.exec(currentFile)) {
// only compile *.sol file.
var target = currentFile
var sources = {}
var provider = fileManager.fileProviderOf(currentFile)
if (provider) {
provider.get(target, (error, content) => {
if (error) {
console.log(error)
} else {
sources[target] = { content }
compiler.compile(sources, target)
}
})
} else {
console.log('cannot compile ' + currentFile + '. Does not belong to any explorer')
}
}
}
}
@ -764,10 +768,6 @@ function run () {
}
})
compiler.event.register('compilationStarted', this, function () {
editor.clearAnnotations()
})
function startdebugging (txHash) {
self.event.trigger('debuggingRequested', [])
transactionDebugger.debug(txHash)

Loading…
Cancel
Save