added semver

pull/1/head
LianaHus 5 years ago
parent 411a5e6a6b
commit 5fde1730de
  1. 3
      package.json
  2. 5
      src/app/tabs/compileTab/compilerContainer.js

@ -73,7 +73,8 @@
"dependencies": {
"http-server": "^0.11.1",
"remix-plugin": "0.0.2-alpha.10",
"remixd": "0.1.8-alpha.6"
"remixd": "0.1.8-alpha.6",
"semver": "^6.1.2"
},
"repository": {
"type": "git",

@ -3,6 +3,7 @@ const yo = require('yo-yo')
var minixhr = require('minixhr')
var helper = require('../../../lib/helper')
const addTooltip = require('../../ui/tooltip')
const semver = require('semver')
var css = require('../styles/compile-tab-styles')
@ -76,6 +77,7 @@ class CompilerContainer {
this._view.compileIcon.setAttribute('title', 'compiler is loading, please wait a few moments.')
this._view.compileIcon.classList.add(`${css.spinningIcon}`)
this._view.warnCompilationSlow.style.visibility = 'hidden'
this._updateLanguageSelector()
})
this.compileTabLogic.compiler.event.register('compilerLoaded', () => {
@ -224,7 +226,6 @@ class CompilerContainer {
</article>
</section>`
this._updateLanguageSelector()
return this._view.compileContainer
}
@ -304,7 +305,7 @@ class CompilerContainer {
}
_updateLanguageSelector () {
if (this._retrieveVersion() < '0.5.7') {
if (semver.lt(this._retrieveVersion(), '0.5.7')) {
this._view.languageSelector.setAttribute('disabled', '')
this._view.languageSelector.value = 'Solidity'
this.compileTabLogic.setLanguage('Solidity')

Loading…
Cancel
Save