fix: resolving merge conflicts

pull/5370/head
davidzagi93@gmail.com 3 years ago
commit 2a5910c75c
  1. 18
      apps/solidity-compiler/webpack.config.js
  2. 13
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
  3. 8
      nx.json
  4. 6083
      package-lock.json
  5. 18
      package.json

@ -1,9 +1,9 @@
const nxWebpack = require('@nrwl/react/plugins/webpack') const nxWebpack = require('@nrwl/react/plugins/webpack')
const TerserPlugin = require('terser-webpack-plugin')
module.exports = config => { module.exports = config => {
const nxWebpackConfig = nxWebpack(config) const nxWebpackConfig = nxWebpack(config)
const webpackConfig = {
return {
...nxWebpackConfig, ...nxWebpackConfig,
node: { node: {
fs: 'empty', fs: 'empty',
@ -14,4 +14,18 @@ module.exports = config => {
child_process: 'empty' child_process: 'empty'
} }
} }
if (process.env.NODE_ENV === 'production') {
return {
...webpackConfig,
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()]
}
}
} else {
return webpackConfig
}
} }

@ -114,12 +114,13 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} }
if (typeof file === 'undefined') { if (typeof file === 'undefined') {
var content = _deps.editor.currentContent() const content = _deps.editor.currentContent()
_execute(content, cb) _execute(content, cb)
return return
} }
var provider = _deps.fileManager.fileProviderOf(file) const provider = _deps.fileManager.fileProviderOf(file)
console.log({ provider })
if (!provider) { if (!provider) {
// toolTip(`provider for path ${file} not found`) // toolTip(`provider for path ${file} not found`)
@ -128,6 +129,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} }
provider.get(file, (error, content) => { provider.get(file, (error, content) => {
console.log({ content })
if (error) { if (error) {
// toolTip(error) // toolTip(error)
// TODO: pop up // TODO: pop up
@ -137,7 +139,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
_execute(content, cb) _execute(content, cb)
}) })
return ''
} }
function loadgist (id, cb) { function loadgist (id, cb) {
@ -326,8 +327,8 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
if (mode) { if (mode) {
const filterUndefined = (el) => el !== undefined && el !== null const filterUndefined = (el) => el !== undefined && el !== null
return function logger (args) { return function logger (args) {
var types = args.filter(filterUndefined).map(type => type) const types = args.filter(filterUndefined).map(type => type)
var values = javascriptserialize.apply(null, args.filter(filterUndefined)).map(function (val, idx) { const values = javascriptserialize.apply(null, args.filter(filterUndefined)).map(function (val, idx) {
if (typeof args[idx] === 'string') { if (typeof args[idx] === 'string') {
const el = document.createElement('div') const el = document.createElement('div')
el.innerHTML = args[idx].replace(/(\r\n|\n|\r)/gm, '<br>') el.innerHTML = args[idx].replace(/(\r\n|\n|\r)/gm, '<br>')
@ -412,7 +413,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
} }
const handleAutoComplete = () => ( const handleAutoComplete = () => (
<div className='popup alert alert-secondary' style={{ display: autoCompletState.showSuggestions && autoCompletState.userInput !== '' ? 'block' : 'none' }}> <div className='popup alert alert-secondary' style={{ display: (autoCompletState.showSuggestions && autoCompletState.userInput !== '') && autoCompletState.data._options.length > 0 ? 'block' : 'none' }}>
<div> <div>
{autoCompletState.data._options.map((item, index) => { {autoCompletState.data._options.map((item, index) => {
return ( return (

@ -130,5 +130,13 @@
"remix-ide-e2e-src-local-plugin": { "remix-ide-e2e-src-local-plugin": {
"tags": [] "tags": []
} }
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
} }
} }

6083
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -57,7 +57,7 @@
"downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/remix-ide/src/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/solidity-compiler/src/assets/js/soljson.js", "downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/remix-ide/src/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/solidity-compiler/src/assets/js/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",
"build:production": "NODE_ENV=production npx nx build remix-ide --with-deps --skip-nx-cache && npx nx build remix-ide", "build:production": "NODE_ENV=production nx build remix-ide --skip-nx-cache",
"serve:production": "npx http-server ./dist/apps/remix-ide", "serve:production": "npx http-server ./dist/apps/remix-ide",
"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",
"nightwatch_local_firefox": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox", "nightwatch_local_firefox": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox",
@ -201,14 +201,14 @@
"@babel/preset-typescript": "7.9.0", "@babel/preset-typescript": "7.9.0",
"@babel/register": "^7.4.4", "@babel/register": "^7.4.4",
"@fortawesome/fontawesome-free": "^5.8.1", "@fortawesome/fontawesome-free": "^5.8.1",
"@nrwl/cli": "^12.9.0", "@nrwl/cli": "12.3.6",
"@nrwl/eslint-plugin-nx": "^12.9.0", "@nrwl/eslint-plugin-nx": "12.3.6",
"@nrwl/jest": "^12.9.0", "@nrwl/jest": "12.3.6",
"@nrwl/linter": "^12.9.0", "@nrwl/linter": "12.3.6",
"@nrwl/node": "^12.9.0", "@nrwl/node": "12.3.6",
"@nrwl/react": "^12.9.0", "@nrwl/react": "12.3.6",
"@nrwl/web": "^12.9.0", "@nrwl/web": "12.3.6",
"@nrwl/workspace": "^12.9.0", "@nrwl/workspace": "12.3.6",
"@testing-library/react": "10.4.1", "@testing-library/react": "10.4.1",
"@types/axios": "^0.14.0", "@types/axios": "^0.14.0",
"@types/chai": "^4.2.11", "@types/chai": "^4.2.11",

Loading…
Cancel
Save