load soljson.js

pull/653/head
yann300 4 years ago
parent 45074c9edc
commit 0b35da0e94
  1. 7
      .circleci/config.yml
  2. 15
      apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
  3. 2
      apps/remix-ide/src/assets/js/0.7.7/app.js
  4. 3
      package.json
  5. 1
      workspace.json

@ -49,7 +49,6 @@ jobs:
- run: npm run lint - run: npm run lint
# - run: npm run lint remix-ide-e2e # - run: npm run lint remix-ide-e2e
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: - run:
name: Download Selenium name: Download Selenium
@ -87,7 +86,6 @@ jobs:
- run: npm run lint - run: npm run lint
# - run: npm run lint remix-ide-e2e # - run: npm run lint remix-ide-e2e
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: - run:
name: Download Selenium name: Download Selenium
@ -130,7 +128,6 @@ jobs:
- run: npm run lint - run: npm run lint
# - run: npm run lint remix-ide-e2e # - run: npm run lint remix-ide-e2e
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: - run:
name: Download Selenium name: Download Selenium
@ -167,7 +164,6 @@ jobs:
- run: npm install - run: npm install
- run: npm run lint - run: npm run lint
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: - run:
name: Deploy name: Deploy
@ -197,7 +193,6 @@ jobs:
- setup_remote_docker - setup_remote_docker
- run: npm install - run: npm install
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: ./apps/remix-ide/ci/copy_resources.sh - run: ./apps/remix-ide/ci/copy_resources.sh
- run: ./apps/remix-ide/ci/publishIpfs - run: ./apps/remix-ide/ci/publishIpfs
@ -224,7 +219,6 @@ jobs:
- run: npm install - run: npm install
- run: npm run lint - run: npm run lint
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: - run:
name: Deploy name: Deploy
@ -254,7 +248,6 @@ jobs:
- run: npm install - run: npm install
- run: npm run lint - run: npm run lint
- run: npm run build:libs - run: npm run build:libs
- run: npm run downloadsolc_root
- run: npm run build - run: npm run build
- run: - run:
name: Deploy name: Deploy

@ -22,7 +22,7 @@ class CompilerContainer {
timeout: 300, timeout: 300,
allversions: null, allversions: null,
selectedVersion: null, selectedVersion: null,
defaultVersion: 'soljson-v0.7.4+commit.3f05b770.js' // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler defaultVersion: 'soljson-v0.7.4+commit.3f05b770.js' // this default version is defined: in makeMockCompiler (for browser test)
} }
} }
@ -209,6 +209,7 @@ class CompilerContainer {
this._view.versionSelector = yo` this._view.versionSelector = yo`
<select onchange="${this.onchangeLoadVersion.bind(this)}" class="custom-select" id="versionSelector" disabled> <select onchange="${this.onchangeLoadVersion.bind(this)}" class="custom-select" id="versionSelector" disabled>
<option disabled selected>${this.data.defaultVersion}</option> <option disabled selected>${this.data.defaultVersion}</option>
<option disabled>builtin</option>
</select>` </select>`
this._view.languageSelector = yo` this._view.languageSelector = yo`
<select onchange="${this.onchangeLanguage.bind(this)}" class="custom-select" id="compilierLanguageSelector" title="Available since v0.5.7"> <select onchange="${this.onchangeLanguage.bind(this)}" class="custom-select" id="compilierLanguageSelector" title="Available since v0.5.7">
@ -449,7 +450,9 @@ class CompilerContainer {
this.queryParams.update({ version: this.data.selectedVersion }) this.queryParams.update({ version: this.data.selectedVersion })
} else if (this.data.selectedVersion === 'builtin') { } else if (this.data.selectedVersion === 'builtin') {
let location = window.document.location let location = window.document.location
location = `${location.protocol}//${location.host}/${location.pathname}` let path = location.pathname
if (!path.startsWith('/')) path = '/' + path
location = `${location.protocol}//${location.host}${path}assets/js`
if (location.endsWith('index.html')) location = location.substring(0, location.length - 10) if (location.endsWith('index.html')) location = location.substring(0, location.length - 10)
if (!location.endsWith('/')) location += '/' if (!location.endsWith('/')) location += '/'
url = location + 'soljson.js' url = location + 'soljson.js'
@ -499,7 +502,8 @@ class CompilerContainer {
// fetching both normal and wasm builds and creating a [version, baseUrl] map // fetching both normal and wasm builds and creating a [version, baseUrl] map
async fetchAllVersion (callback) { async fetchAllVersion (callback) {
let allVersions, selectedVersion, allVersionsWasm, isURL let selectedVersion, allVersionsWasm, isURL
let allVersions = [{ path: 'builtin', longVersion: 'latest local version' }]
// fetch normal builds // fetch normal builds
const binRes = await promisedMiniXhr(`${baseURLBin}/list.json`) const binRes = await promisedMiniXhr(`${baseURLBin}/list.json`)
// fetch wasm builds // fetch wasm builds
@ -507,10 +511,11 @@ class CompilerContainer {
if (binRes.event.type === 'error' && wasmRes.event.type === 'error') { if (binRes.event.type === 'error' && wasmRes.event.type === 'error') {
allVersions = [{ path: 'builtin', longVersion: 'latest local version' }] allVersions = [{ path: 'builtin', longVersion: 'latest local version' }]
selectedVersion = 'builtin' selectedVersion = 'builtin'
callback(allVersions, selectedVersion) return callback(allVersions, selectedVersion)
} }
try { try {
allVersions = JSON.parse(binRes.json).builds.slice().reverse() const versions = JSON.parse(binRes.json).builds.slice().reverse()
allVersions = [...allVersions, ...versions]
selectedVersion = this.data.defaultVersion selectedVersion = this.data.defaultVersion
if (this.queryParams.get().version) selectedVersion = this.queryParams.get().version if (this.queryParams.get().version) selectedVersion = this.queryParams.get().version
// Check if version is a URL and corresponding filename starts with 'soljson' // Check if version is a URL and corresponding filename starts with 'soljson'

@ -264703,7 +264703,7 @@ module.exports = function () {
timeout: 300, timeout: 300,
allversions: null, allversions: null,
selectedVersion: null, selectedVersion: null,
defaultVersion: 'soljson-v0.5.1+commit.c8a2cb62.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler defaultVersion: 'soljson-v0.5.1+commit.c8a2cb62.js', // this default version is defined: in makeMockCompiler (for browser test)
baseurl: 'https://solc-bin.ethereum.org/bin' baseurl: 'https://solc-bin.ethereum.org/bin'
}; };
self.data.optimize = self._components.queryParams.get().optimize; self.data.optimize = self._components.queryParams.get().optimize;

@ -49,7 +49,6 @@
"bumpVersion:libs": "gulp & gulp syncLibVersions;", "bumpVersion:libs": "gulp & gulp syncLibVersions;",
"browsertest": "sleep 5 && npm run nightwatch_local", "browsertest": "sleep 5 && npm run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/assets/css/font-awesome.min.css' apps/remix-ide/assets/css/", "csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/assets/css/font-awesome.min.css' apps/remix-ide/assets/css/",
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.7.4+commit.3f05b770.js -O ./apps/remix-ide/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js", "make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"nightwatch_parallel": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", "nightwatch_parallel": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox",
@ -87,7 +86,7 @@
"selenium": "selenium-standalone start", "selenium": "selenium-standalone start",
"selenium-install": "selenium-standalone install", "selenium-install": "selenium-standalone install",
"sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js", "sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js",
"test-browser": "npm-run-all -lpr selenium downloadsolc_root make-mock-compiler serve browsertest", "test-browser": "npm-run-all -lpr selenium make-mock-compiler serve browsertest",
"watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc", "watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc",
"reinstall": "rm ./node-modules/ -rf & rm package-lock.json & rm ./build/ -rf & npm install & npm run build", "reinstall": "rm ./node-modules/ -rf & rm package-lock.json & rm ./build/ -rf & npm install & npm run build",
"ganache-cli": "npx ganache-cli" "ganache-cli": "npx ganache-cli"

@ -59,7 +59,6 @@
"**/node_modules/**", "**/node_modules/**",
"apps/remix-ide/build/**/*.js", "apps/remix-ide/build/**/*.js",
"apps/remix-ide/src/app/editor/mode-solidity.js", "apps/remix-ide/src/app/editor/mode-solidity.js",
"apps/remix-ide/soljson.js",
"apps/remix-ide/js/**/*.js", "apps/remix-ide/js/**/*.js",
"apps/remix-ide/src/assets/js/**/*.js" "apps/remix-ide/src/assets/js/**/*.js"
] ]

Loading…
Cancel
Save