fix production build

pull/1755/head
yann300 3 years ago
parent 8b650eb0d1
commit cce3fb941e
  1. 21
      .circleci/config.yml
  2. 3
      .gitmodules
  3. 3
      apps/remix-ide/.babelrc
  4. 7
      apps/remix-ide/src/app/panels/tab-proxy.js
  5. 2
      apps/remix-ide/src/assets/js/react-tabs.production.min.js
  6. 2
      babel.config.js
  7. 3
      libs/remix-ui/tabs/.babelrc
  8. 1
      libs/remix-ui/tabs/react-tabs
  9. 5
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx
  10. 1
      package.json

@ -72,6 +72,8 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run:
@ -105,6 +107,8 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
@ -139,6 +143,8 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run:
@ -172,6 +178,8 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
@ -206,6 +214,8 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run:
@ -239,6 +249,8 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run: npx nx build remix-ide-e2e-src-local-plugin
@ -254,6 +266,7 @@ jobs:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
deploy-remix-live:
docker:
# specify the version you desire here
@ -272,6 +285,8 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npm run build:production
@ -300,6 +315,8 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- setup_remote_docker
- run: npm install
- run: npm run downloadsolc_assets
@ -326,6 +343,8 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npm run build:production
@ -354,6 +373,8 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run build:libs
- run: npm run downloadsolc_assets

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "libs/remix-ui/tabs/react-tabs"]
path = libs/remix-ui/tabs/react-tabs
url = https://github.com/reactjs/react-tabs

@ -1,3 +1,4 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"]
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": ["@babel/plugin-proposal-class-properties"]
}

@ -308,13 +308,8 @@ export class TabProxy extends Plugin {
}
renderTabsbar () {
window.React = React
const script = document.createElement('script')
script.type = 'text/javascript'
script.src = 'assets/js/react-tabs.production.min.js'
document.head.appendChild(script)
script.addEventListener('load', () => this.renderComponent())
this.el = document.createElement('div')
this.renderComponent()
return this.el
}
}

File diff suppressed because one or more lines are too long

@ -1,4 +1,4 @@
module.exports = {
"presets": ["@babel/preset-react", "@babel/preset-typescript"],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
"plugins": ["@babel/plugin-transform-modules-commonjs", "@babel/plugin-proposal-class-properties"]
}

@ -1,3 +1,4 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]]
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]],
"plugins": ["@babel/plugin-proposal-class-properties"]
}

@ -0,0 +1 @@
Subproject commit 5a1fb0dc4b79f811e63e2f029786ff36b68bcbf4

@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint-disable-line
// import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'
import { Tab, Tabs, TabList, TabPanel } from '../../react-tabs/src/index'
import './remix-ui-tabs.css'
/* eslint-disable-next-line */
@ -17,10 +17,7 @@ export interface TabsUIApi {
active: () => string
}
declare var ReactTabs: any
export const TabsUI = (props: TabsUIProps) => {
const { Tab, Tabs, TabList, TabPanel } = ReactTabs
const [selectedIndex, setSelectedIndex] = useState(-1)
const currentIndexRef = useRef(-1)
const tabsRef = useRef({})

@ -136,6 +136,7 @@
]
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@erebos/bzz-node": "^0.13.0",
"@ethereumjs/block": "^3.5.1",
"@ethereumjs/common": "^2.5.0",

Loading…
Cancel
Save