Merge pull request #2274 from ethereum/cache

invalidate cache
pull/5370/head
yann300 3 years ago committed by GitHub
commit 493ee19e96
  1. 32
      .circleci/config.yml
  2. 1
      apps/remix-ide/.gitignore
  3. 1
      apps/remix-ide/ci/copy_resources.sh
  4. 3
      apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh
  5. 3
      apps/remix-ide/ci/deploy_from_travis_remix-beta.sh
  6. 3
      apps/remix-ide/ci/deploy_from_travis_remix-live.sh
  7. 271121
      apps/remix-ide/src/assets/js/0.7.7/app.js
  8. 52
      apps/remix-ide/src/assets/js/init.js
  9. 39
      apps/remix-ide/src/assets/js/loader.js
  10. 69
      apps/remix-ide/src/index.html
  11. 7
      apps/remix-ide/src/index.tsx
  12. 65
      apps/remix-ide/src/production.index.html
  13. 92
      apps/remix-ide/src/webpack.index.html
  14. 15
      apps/remix-ide/webpack.config.js
  15. 10
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
  16. 3
      workspace.json

@ -191,7 +191,6 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/runtime.js dist/apps/remix-ide/vendor.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app.js dist/apps/remix-ide/app.js"
working_directory: ~/remix-project working_directory: ~/remix-project
parallelism: 7 parallelism: 7
steps: steps:
@ -235,7 +234,7 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/production.index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app.js dist/apps/remix-ide/app.js" - FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/main*.js dist/apps/remix-ide/polyfills*.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app*.js dist/apps/remix-ide/app*.js"
working_directory: ~/remix-project working_directory: ~/remix-project
steps: steps:
@ -250,31 +249,6 @@ jobs:
./apps/remix-ide/ci/deploy_from_travis_remix-live.sh; ./apps/remix-ide/ci/deploy_from_travis_remix-live.sh;
fi fi
publish:
docker:
# specify the version you desire here
- image: cimg/node:14.17.6-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/production.index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app.js dist/apps/remix-ide/app.js"
working_directory: ~/remix-project
steps:
- checkout
- setup_remote_docker
- run: npm install
- run: npm run downloadsolc_assets
- run: npm run build:production
- run: ./apps/remix-ide/ci/copy_resources.sh
- run: ./apps/remix-ide/ci/publishIpfs
- run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh
deploy-remix-alpha: deploy-remix-alpha:
docker: docker:
@ -289,7 +263,7 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/production.index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app.js dist/apps/remix-ide/app.js" - FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/main*.js dist/apps/remix-ide/polyfills*.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app*.js dist/apps/remix-ide/app*.js"
working_directory: ~/remix-project working_directory: ~/remix-project
steps: steps:
@ -317,7 +291,7 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/production.index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app.js dist/apps/remix-ide/app.js" - FILES_TO_PACKAGE: "dist/apps/remix-ide/raw-loader*.js dist/apps/remix-ide/assets dist/apps/remix-ide/main*.js dist/apps/remix-ide/polyfills*.js dist/apps/remix-ide/favicon.ico dist/apps/remix-ide/vendors~app*.js dist/apps/remix-ide/app*.js"
working_directory: ~/remix-project working_directory: ~/remix-project
steps: steps:

@ -12,3 +12,4 @@ remix
TODO TODO
.tern-port .tern-port
temp_publish_docker temp_publish_docker
src/assets/version.json

@ -5,4 +5,3 @@ rm -rf temp_publish_docker
mkdir temp_publish_docker mkdir temp_publish_docker
cp -r $FILES_TO_PACKAGE temp_publish_docker cp -r $FILES_TO_PACKAGE temp_publish_docker
ls ls
mv temp_publish_docker/production.index.html temp_publish_docker/index.html

@ -14,8 +14,7 @@ echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./" cp -r $FILES_TO_PACKAGE "./"
rm -rf dist rm -rf dist
ls ls
mv production.index.html index.html FILES_TO_DEPLOY="assets index.html main*.js polyfills*.js favicon.ico vendors~app*.js app*.js raw-loader*.js"
FILES_TO_DEPLOY="assets index.html main.js polyfills.js favicon.ico vendors~app.js app.js raw-loader*.js"
# ZIP the whole directory # ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore # -f is needed because "build" is part of .gitignore

@ -14,8 +14,7 @@ echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./" cp -r $FILES_TO_PACKAGE "./"
rm -rf dist rm -rf dist
ls ls
mv production.index.html index.html FILES_TO_DEPLOY="assets index.html main*.js polyfills*.js favicon.ico vendors~app*.js app*.js raw-loader*.js"
FILES_TO_DEPLOY="assets index.html main.js polyfills.js favicon.ico vendors~app.js app.js raw-loader*.js"
# ZIP the whole directory # ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore # -f is needed because "build" is part of .gitignore

@ -14,8 +14,7 @@ echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md
cp -r $FILES_TO_PACKAGE "./" cp -r $FILES_TO_PACKAGE "./"
rm -rf dist rm -rf dist
ls ls
mv production.index.html index.html FILES_TO_DEPLOY="assets index.html main*.js polyfills*.js vendors~app*.js app*.js raw-loader*.js"
FILES_TO_DEPLOY="assets index.html main.js polyfills.js vendors~app.js app.js raw-loader*.js"
# ZIP the whole directory # ZIP the whole directory
zip -r remix-$SHA.zip $FILES_TO_DEPLOY zip -r remix-$SHA.zip $FILES_TO_DEPLOY
# -f is needed because "build" is part of .gitignore # -f is needed because "build" is part of .gitignore

File diff suppressed because one or more lines are too long

@ -1,52 +0,0 @@
/* eslint-disable prefer-promise-reject-errors */
function urlParams() {
var qs = window.location.hash.substr(1)
if (window.location.search.length > 0) {
// use legacy query params instead of hash
window.location.hash = window.location.search.substr(1)
window.location.search = ''
}
var params = {}
var parts = qs.split('&')
for (var x in parts) {
var keyValue = parts[x].split('=')
if (keyValue[0] !== '') {
params[keyValue[0]] = keyValue[1]
}
}
return params
}
const defaultVersion = '0.8.0'
const versionToLoad = urlParams().appVersion ? urlParams().appVersion : defaultVersion
const assets = {
'0.8.0': ['https://use.fontawesome.com/releases/v5.8.1/css/all.css', 'assets/css/pygment_trac.css'],
'0.7.7': ['assets/css/font-awesome.min.css', 'assets/css/pygment_trac.css']
}
const versions = {
'0.7.7': 'assets/js/0.7.7/app.js', // commit 7b5c7ae3de935e0ccc32eadfd83bf7349478491e
'0.8.0': 'main.js'
}
for (const k in assets[versionToLoad]) {
const app = document.createElement('link')
app.setAttribute('rel', 'stylesheet')
app.setAttribute('href', assets[versionToLoad][k])
if (assets[versionToLoad][k] === 'https://use.fontawesome.com/releases/v5.8.1/css/all.css') {
app.setAttribute('integrity', 'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf')
app.setAttribute('crossorigin', 'anonymous')
}
document.head.appendChild(app)
}
window.onload = () => {
function loadApp() {
const app = document.createElement('script')
app.setAttribute('src', versions[versionToLoad])
document.body.appendChild(app)
}
loadApp()
return
}

@ -0,0 +1,39 @@
const domains = {
'remix-alpha.ethereum.org': 27,
'remix-beta.ethereum.org': 25,
'remix.ethereum.org': 23
}
if (domains[window.location.hostname]) {
var _paq = window._paq = window._paq || []
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);
_paq.push(['enableJSErrorTracking']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "https://matomo.ethereum.org/";
_paq.push(['setTrackerUrl', u + 'matomo.php'])
_paq.push(['setSiteId', domains[window.location.hostname]])
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]
g.type = 'text/javascript'; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s)
})()
}
createScriptTag = function (url, type) {
var script = document.createElement('script');
script.src = url;
script.type = type;
document.getElementsByTagName('head')[0].appendChild(script);
};
fetch('assets/version.json', { cache: "no-store" }).then(response => {
response.text().then(function (data) {
const version = JSON.parse(data);
console.log(`Loading Remix ${version.version}`);
createScriptTag(`polyfills.${version.version}.${version.timestamp}.js`, 'module');
if (version.mode === 'development') {
createScriptTag(`vendor.${version.version}.${version.timestamp}.js`, 'module');
createScriptTag(`runtime.${version.version}.${version.timestamp}.js`, 'module');
}
createScriptTag(`main.${version.version}.${version.timestamp}.js`, 'text/javascript');
});
});

@ -1,9 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<meta charset="utf-8"> <head>
<!-- <meta charset="utf-8">
<!--
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2014, 2015, the individual contributors Copyright (c) 2014, 2015, the individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
@ -22,46 +23,24 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
--> -->
<meta http-equiv="X-UA-Compatible" content="chrome=1"> <meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Remix - Ethereum IDE</title> <title>Remix - Ethereum IDE</title>
<link rel="stylesheet" href="assets/css/pygment_trac.css"> <link rel="stylesheet" href="assets/css/pygment_trac.css">
<link rel="icon" type="x-icon" href="assets/img/icon.png"> <link rel="icon" type="x-icon" href="assets/img/icon.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/4.1.0/introjs.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/4.1.0/introjs.min.css">
<script src="assets/js/browserfs.min.js"></script> <link rel="stylesheet" integrity="ha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
<!-- Matomo --> <script src="assets/js/browserfs.min.js"></script>
<script type="text/javascript"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
const domains = { <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.7.0/introjs.min.css">
'remix-alpha.ethereum.org': 27, </head>
'remix-beta.ethereum.org': 25,
'remix.ethereum.org': 23 <body>
}
if (domains[window.location.hostname]) { <div id="root"></div>
var _paq = window._paq = window._paq || [] <script type="text/javascript" src="assets/js/loader.js"></script>
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */ <script src="https://kit.fontawesome.com/41dd021e94.js" crossorigin="anonymous"></script>
_paq.push(['disableCookies']); <script type="text/javascript" src="assets/js/intro.min.js"></script>
_paq.push(['enableJSErrorTracking']); </body>
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.ethereum.org/";
_paq.push(['setTrackerUrl', u+'matomo.php'])
_paq.push(['setSiteId', domains[window.location.hostname]])
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s)
})()
}
</script>
<!-- End Matomo Code -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.7.0/introjs.min.css">
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="assets/js/init.js"></script>
<script src="runtime.js" type="module"></script>
<script src="polyfills.js" type="module"></script>
<script src="vendor.js" type="module"></script>
<script src="https://kit.fontawesome.com/41dd021e94.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="assets/js/intro.min.js"></script>
</body>
</html> </html>

@ -8,13 +8,12 @@ import Config from './config'
import Registry from './app/state/registry' import Registry from './app/state/registry'
import { Storage } from '@remix-project/remix-lib' import { Storage } from '@remix-project/remix-lib'
(async function() { (async function () {
// load current theme befor anything else
try { try {
const configStorage = new Storage('config-v0.8:') const configStorage = new Storage('config-v0.8:')
const config = new Config(configStorage); const config = new Config(configStorage);
Registry.getInstance().put({ api: config, name: 'config' }) Registry.getInstance().put({ api: config, name: 'config' })
} catch (e) {} } catch (e) { }
const theme = new ThemeModule() const theme = new ThemeModule()
theme.initTheme() theme.initTheme()
@ -25,3 +24,5 @@ import { Storage } from '@remix-project/remix-lib'
document.getElementById('root') document.getElementById('root')
) )
})() })()

@ -1,65 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!--
The MIT License (MIT)
Copyright (c) 2014, 2015, the individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Remix - Ethereum IDE</title>
<link rel="stylesheet" href="assets/css/pygment_trac.css">
<link rel="icon" type="x-icon" href="assets/img/icon.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/4.1.0/introjs.min.css">
<script src="assets/js/browserfs.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!-- Matomo -->
<script type="text/javascript">
const domains = {
'remix-alpha.ethereum.org': 27,
'remix-beta.ethereum.org': 25,
'remix.ethereum.org': 23
}
if (domains[window.location.hostname]) {
var _paq = window._paq = window._paq || []
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['disableCookies']);
_paq.push(['enableJSErrorTracking']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://matomo.ethereum.org/";
_paq.push(['setTrackerUrl', u+'matomo.php'])
_paq.push(['setSiteId', domains[window.location.hostname]])
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s)
})()
}
</script>
<!-- End Matomo Code -->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.7.0/introjs.min.css">
</head>
<body>
<div id="root"></div>
<script type="text/javascript" src="assets/js/init.js"></script>
<script src="polyfills.js" type="module"></script>
<script src="https://kit.fontawesome.com/41dd021e94.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="assets/js/intro.min.js"></script>
</body>
</html>

@ -1,23 +1,20 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<meta charset="utf-8">
<!--
The MIT License (MIT)
<head>
<meta charset="utf-8">
<!--
The MIT License (MIT)
Copyright (c) 2014, 2015, the individual contributors Copyright (c) 2014, 2015, the individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -26,68 +23,23 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
--> -->
<meta http-equiv="X-UA-Compatible" content="chrome=1"> <meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Remix - Ethereum IDE</title> <title>Remix - Ethereum IDE</title>
<link rel="stylesheet" href="assets/css/pygment_trac.css"> <link rel="stylesheet" href="assets/css/pygment_trac.css">
<link rel="icon" type="x-icon" href="icon.png"> <link rel="icon" type="x-icon" href="assets/img/icon.png">
<script src="assets/js/browserfs.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/4.1.0/introjs.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <link rel="stylesheet" integrity="ha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
</head> crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
<body> <script src="assets/js/browserfs.min.js"></script>
<div id="root"></div> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.7.0/introjs.min.css">
function urlParams () { </head>
var qs = window.location.hash.substr(1)
<body>
if (window.location.search.length > 0) {
// use legacy query params instead of hash <div id="root"></div>
window.location.hash = window.location.search.substr(1) <script src="https://kit.fontawesome.com/41dd021e94.js" crossorigin="anonymous"></script>
window.location.search = '' <script type="text/javascript" src="assets/js/intro.min.js"></script>
} </body>
var params = {}
var parts = qs.split('&')
for (var x in parts) {
var keyValue = parts[x].split('=')
if (keyValue[0] !== '') {
params[keyValue[0]] = keyValue[1]
}
}
return params
}
const defaultVersion = '0.8.0'
let versionToLoad = urlParams().appVersion ? urlParams().appVersion : defaultVersion
let assets = {
'0.8.0': ['https://use.fontawesome.com/releases/v5.8.1/css/all.css', 'assets/css/pygment_trac.css'],
'0.7.7': ['assets/css/font-awesome.min.css', 'assets/css/pygment_trac.css']
}
let versions = {
'0.7.7': 'assets/js/0.7.7/app.js', // commit 7b5c7ae3de935e0ccc32eadfd83bf7349478491e
'0.8.0': 'main.js'
}
for (let k in assets[versionToLoad]) {
let app = document.createElement('link')
app.setAttribute('rel', 'stylesheet')
app.setAttribute('href', assets[versionToLoad][k])
if (assets[versionToLoad][k] === 'https://use.fontawesome.com/releases/v5.8.1/css/all.css') {
app.setAttribute('integrity', 'sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf')
app.setAttribute('crossorigin', 'anonymous')
}
document.head.appendChild(app)
}
window.onload = () => {
BrowserFS.install(window)
BrowserFS.configure({
fs: "LocalStorage"
}, function(e) {
if (e) console.log(e)
let app = document.createElement('script')
app.setAttribute('src', versions[versionToLoad])
document.body.appendChild(app)
window.remixFileSystem = require('fs')
})
}
</script>
</body>
</html> </html>

@ -1,6 +1,16 @@
const nxWebpack = require('@nrwl/react/plugins/webpack') const nxWebpack = require('@nrwl/react/plugins/webpack')
const TerserPlugin = require('terser-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin') const CopyWebpackPlugin = require('copy-webpack-plugin')
const version = require('../../package.json').version
const fs = require('fs')
const versionData = {
version: version,
timestamp: Date.now(),
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development'
}
fs.writeFileSync('./apps/remix-ide/src/assets/version.json', JSON.stringify(versionData))
module.exports = config => { module.exports = config => {
const nxWebpackConfig = nxWebpack(config) const nxWebpackConfig = nxWebpack(config)
@ -14,6 +24,11 @@ module.exports = config => {
module: 'empty', module: 'empty',
child_process: 'empty' child_process: 'empty'
}, },
output: {
...nxWebpackConfig.output,
filename: `[name].${versionData.version}.${versionData.timestamp}.js`,
chunkFilename: `[name].${versionData.version}.${versionData.timestamp}.js`,
},
plugins: [ plugins: [
...nxWebpackConfig.plugins, ...nxWebpackConfig.plugins,
new CopyWebpackPlugin({ new CopyWebpackPlugin({

@ -141,12 +141,6 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
plugin.call('gistHandler', 'load', '') plugin.call('gistHandler', 'load', '')
plugin.verticalIcons.select('filePanel') plugin.verticalIcons.select('filePanel')
} }
const switchToPreviousVersion = () => {
const query = new QueryParams()
query.update({ appVersion: '0.7.7' })
_paq.push(['trackEvent', 'LoadingType', 'oldExperience_0.7.7'])
document.location.reload()
}
const startSolidity = async () => { const startSolidity = async () => {
await plugin.appManager.activatePlugin(['solidity', 'udapp', 'solidityStaticAnalysis', 'solidityUnitTesting']) await plugin.appManager.activatePlugin(['solidity', 'udapp', 'solidityStaticAnalysis', 'solidityUnitTesting'])
plugin.verticalIcons.select('solidity') plugin.verticalIcons.select('solidity')
@ -310,10 +304,6 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
<img id='remixHhomeWebsite' className="mr-2 remixui_home_image" src={ plugin.profile.icon } style={ { filter: state.themeQuality.filter } } alt=''></img> <img id='remixHhomeWebsite' className="mr-2 remixui_home_image" src={ plugin.profile.icon } style={ { filter: state.themeQuality.filter } } alt=''></img>
<a className="remixui_home_text" target="__blank" href="https://remix-project.org">Featuring website</a> <a className="remixui_home_text" target="__blank" href="https://remix-project.org">Featuring website</a>
</p> </p>
<p className="mb-1">
<i className="mr-2 fab fa-ethereum remixui_home_image"></i>
<label className="remixui_home_text" onClick={() => switchToPreviousVersion()}>Old experience</label>
</p>
</div> </div>
</div> </div>
</div> </div>

@ -19,8 +19,7 @@
"assets": [ "assets": [
"apps/remix-ide/src/assets", "apps/remix-ide/src/assets",
"apps/remix-ide/src/index.html", "apps/remix-ide/src/index.html",
"apps/remix-ide/src/favicon.ico", "apps/remix-ide/src/favicon.ico"
"apps/remix-ide/src/production.index.html"
], ],
"styles": [], "styles": [],
"scripts": [], "scripts": [],

Loading…
Cancel
Save