app build & serve

rdesktop
bunsenstraat 2 years ago committed by filip mertens
parent c65465b056
commit 47f3fa47a3
  1. 3
      .gitignore
  2. 7
      apps/remix-ide/project.json
  3. 1
      apps/remix-ide/src/app/plugins/remixd-handle.tsx
  4. 3
      apps/remix-ide/src/app/tabs/theme-module.js
  5. 14
      apps/remix-ide/webpack.config.js
  6. 9
      apps/remixdesktop/.webpack/main/index.html
  7. 16
      apps/remixdesktop/.webpack/main/main.js
  8. 128
      apps/remixdesktop/.webpack/main/runtime.js
  9. 1
      apps/remixdesktop/.webpack/main/runtime.js.map
  10. 27
      apps/remixdesktop/package.json
  11. 35
      apps/remixdesktop/project.json
  12. 0
      apps/remixdesktop/src/favicon.ico
  13. 10
      apps/remixdesktop/src/index.html
  14. 54
      apps/remixdesktop/src/main.ts
  15. 7
      apps/remixdesktop/src/polyfills.ts
  16. 22
      apps/remixdesktop/tsconfig.app.json
  17. 22
      apps/remixdesktop/tsconfig.json
  18. 107
      apps/remixdesktop/webpack.config.js
  19. 2594
      apps/remixdesktop/yarn.lock
  20. 2
      libs/remix-solidity/src/compiler/compiler-utils.ts
  21. 2
      libs/remix-ui/workspace/src/lib/actions/index.ts
  22. 8
      package.json
  23. 1037
      yarn.lock

3
.gitignore vendored

@ -57,3 +57,6 @@ testem.log
.DS_Store .DS_Store
.vscode/settings.json .vscode/settings.json
.vscode/launch.json .vscode/launch.json
apps/1test/
apps/remixdesktop/.webpack
apps/remixdesktop/out

@ -39,6 +39,13 @@
"generateIndexHtml": true, "generateIndexHtml": true,
"extractCss": false, "extractCss": false,
"vendorChunk": false "vendorChunk": false
},
"desktop": {
"optimization": true,
"generateIndexHtml": true,
"extractCss": false,
"vendorChunk": false,
"baseHref": "./"
} }
} }
}, },

@ -50,6 +50,7 @@ export class RemixdHandle extends WebsocketPlugin {
} }
async activate() { async activate() {
console.trace('activate remixd')
this.connectToLocalhost() this.connectToLocalhost()
return true return true
} }

@ -40,7 +40,7 @@ export class ThemeModule extends Plugin {
themes.map((theme) => { themes.map((theme) => {
this.themes[theme.name.toLocaleLowerCase()] = { this.themes[theme.name.toLocaleLowerCase()] = {
...theme, ...theme,
url: window.location.origin + ( window.location.pathname.startsWith('/address/') || window.location.pathname.endsWith('.sol') ? '/' : window.location.pathname ) + theme.url url: isElectron()? theme.url: window.location.origin + ( window.location.pathname.startsWith('/address/') || window.location.pathname.endsWith('.sol') ? '/' : window.location.pathname ) + theme.url
} }
}) })
this._paq = _paq this._paq = _paq
@ -85,6 +85,7 @@ export class ThemeModule extends Plugin {
if (callback) callback() if (callback) callback()
}) })
document.head.insertBefore(theme, document.head.firstChild) document.head.insertBefore(theme, document.head.firstChild)
//if (callback) callback()
} }
} }

@ -15,10 +15,10 @@ const versionData = {
} }
const loadLocalSolJson = async () => { const loadLocalSolJson = async () => {
// execute apps/remix-ide/ci/downloadsoljson.sh //execute apps/remix-ide/ci/downloadsoljson.sh
//const child = require('child_process').execSync('bash ' + __dirname + '/ci/downloadsoljson.sh', { encoding: 'utf8', cwd: process.cwd(), shell: true }) const child = require('child_process').execSync('bash ' + __dirname + '/ci/downloadsoljson.sh', { encoding: 'utf8', cwd: process.cwd(), shell: true })
// show output // show output
//console.log(child) console.log(child)
} }
fs.writeFileSync(__dirname + '/src/assets/version.json', JSON.stringify(versionData)) fs.writeFileSync(__dirname + '/src/assets/version.json', JSON.stringify(versionData))
@ -77,7 +77,11 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
} }
// add public path // add public path
config.output.publicPath = '/' if(process.env.NX_DESKTOP_FROM_DIST){
config.output.publicPath = './'
}else{
config.output.publicPath = '/'
}
// set filename // set filename
config.output.filename = `[name].${versionData.version}.${versionData.timestamp}.js` config.output.filename = `[name].${versionData.version}.${versionData.timestamp}.js`
@ -130,7 +134,7 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
ignored: /node_modules/ ignored: /node_modules/
} }
console.log('config', config) console.log('config', process.env.NX_DESKTOP_FROM_DIST)
return config; return config;
}); });

@ -1,9 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Remix Desktop</title>
<base href="./"> </head>
<body>
<script src="runtime.js" type="module"></script><script src="main.js" type="module"></script></body>
</html>

@ -1,16 +0,0 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([["main"],{
/***/ 117:
/***/ (() => {
/***/ })
},
/******/ __webpack_require__ => { // webpackRuntimeModules
/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
/******/ var __webpack_exports__ = (__webpack_exec__(117));
/******/ }
]);

@ -1,128 +0,0 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({});
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = __webpack_modules__;
/******/
/************************************************************************/
/******/ /* webpack/runtime/chunk loaded */
/******/ (() => {
/******/ var deferred = [];
/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
/******/ if(chunkIds) {
/******/ priority = priority || 0;
/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
/******/ deferred[i] = [chunkIds, fn, priority];
/******/ return;
/******/ }
/******/ var notFulfilled = Infinity;
/******/ for (var i = 0; i < deferred.length; i++) {
/******/ var [chunkIds, fn, priority] = deferred[i];
/******/ var fulfilled = true;
/******/ for (var j = 0; j < chunkIds.length; j++) {
/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
/******/ chunkIds.splice(j--, 1);
/******/ } else {
/******/ fulfilled = false;
/******/ if(priority < notFulfilled) notFulfilled = priority;
/******/ }
/******/ }
/******/ if(fulfilled) {
/******/ deferred.splice(i--, 1)
/******/ var r = fn();
/******/ if (r !== undefined) result = r;
/******/ }
/******/ }
/******/ return result;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/jsonp chunk loading */
/******/ (() => {
/******/ // no baseURI
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "runtime": 0
/******/ };
/******/
/******/ // no chunk on demand loading
/******/
/******/ // no prefetching
/******/
/******/ // no preloaded
/******/
/******/ // no HMR
/******/
/******/ // no HMR manifest
/******/
/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
/******/
/******/ // install a JSONP callback for chunk loading
/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
/******/ var [chunkIds, moreModules, runtime] = data;
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0;
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
/******/ for(moduleId in moreModules) {
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(runtime) var result = runtime(__webpack_require__);
/******/ }
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ installedChunks[chunkId][0]();
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ return __webpack_require__.O(result);
/******/ }
/******/
/******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
/******/ })();
/******/
/************************************************************************/
/******/
/******/
/******/ })()
;
//# sourceMappingURL=runtime.js.map

@ -1 +0,0 @@
{"version":3,"file":"runtime.js","mappings":";;;;UAAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA","sources":["webpack:///webpack/bootstrap","webpack:///webpack/runtime/chunk loaded","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/before-startup","webpack:///webpack/startup","webpack:///webpack/after-startup"],"sourcesContent":["// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"runtime\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk\"] = self[\"webpackChunk\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","",""],"names":[],"sourceRoot":""}

@ -0,0 +1,27 @@
{
"name": "remixdesktop",
"productName": "remixdesktop",
"version": "1.0.0",
"description": "My Electron application description",
"main": ".webpack/main",
"scripts": {
"start": "electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"publish": "electron-forge publish",
"lint": "eslint --ext .ts,.tsx ."
},
"keywords": [],
"author": {
"name": "bunsenstraat",
"email": "filip.mertens@ethereum.org"
},
"license": "MIT",
"devDependencies": {
"@electron-forge/cli": "^6.1.1",
"electron": "24.4.0"
},
"dependencies": {
"electron-squirrel-startup": "^1.0.0"
}
}

@ -9,45 +9,20 @@
"outputs": ["{options.outputPath}"], "outputs": ["{options.outputPath}"],
"defaultConfiguration": "development", "defaultConfiguration": "development",
"options": { "options": {
"compiler": "babel",
"outputPath": "apps/remixdesktop/.webpack/main", "outputPath": "apps/remixdesktop/.webpack/main",
"index": "apps/remixdesktop/src/index.html",
"baseHref": "./",
"main": "apps/remixdesktop/src/main.ts", "main": "apps/remixdesktop/src/main.ts",
"tsConfig": "apps/remixdesktop/tsconfig.app.json", "tsConfig": "apps/remixdesktop/tsconfig.json",
"assets": [ "assets": [
], ],
"scripts": [], "webpackConfig": "apps/remixdesktop/webpack.config.js",
"webpackConfig": "apps/remixdesktop/webpack.config.js" "vendorChunk": false,
"runtimeChunk": false
}, },
"configurations": { "configurations": {
"development": { "development": {
}, },
"production": { "production": {
"fileReplacements": [ "optimization": true
{
"replace": "apps/remixdesktop/src/environments/environment.ts",
"with": "apps/remixdesktop/src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"executor": "@nrwl/webpack:dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "remixdesktop:build",
"hmr": true,
"baseHref": "/"
},
"configurations": {
"development": {
"buildTarget": "remixdesktop:build:development",
"port": 5003
},
"production": {
"buildTarget": "remixdesktop:build:production"
} }
} }
} }

@ -1,10 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Remix Desktop</title>
<base href="./" />
</head>
<body>
</body>
</html>

@ -0,0 +1,54 @@
import { app, BrowserWindow } from 'electron';
// This allows TypeScript to pick up the magic constants that's auto-generated by Forge's Webpack
// plugin that tells the Electron app where to look for the Webpack-bundled app code (depending on
// whether you're running in development or production).
declare const MAIN_WINDOW_WEBPACK_ENTRY: string;
declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require('electron-squirrel-startup')) {
app.quit();
}
const createWindow = (): void => {
// Create the browser window.
const mainWindow = new BrowserWindow({
height: 600,
width: 800,
// webPreferences: {
// preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
// },
});
// and load the index.html of the app.
mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);
mainWindow.maximize();
// Open the DevTools.
mainWindow.webContents.openDevTools();
};
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.

@ -1,7 +0,0 @@
/**
* Polyfill stable language features. These imports will be optimized by `@babel/preset-env`.
*
* See: https://github.com/zloirock/core-js#babel
*/
import 'core-js/stable';
import 'regenerator-runtime/runtime';

@ -1,22 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node"]
},
"files": [
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": [
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx"
],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}

@ -1,16 +1,20 @@
{ {
"extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"target": "ES6",
"jsx": "react-jsx", "jsx": "react-jsx",
"allowJs": true, "allowJs": true,
"module": "commonjs",
"skipLibCheck": true,
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true "noImplicitAny": true,
}, "sourceMap": true,
"files": [], "baseUrl": ".",
"include": [], "outDir": "dist",
"references": [ "moduleResolution": "node",
{ "resolveJsonModule": true,
"path": "./tsconfig.app.json" "paths": {
"*": ["node_modules/*"]
} }
] },
"include": ["src/**/*"]
} }

@ -5,82 +5,57 @@ const CssMinimizerPlugin = require("css-minimizer-webpack-plugin")
// Nx plugins for webpack. // Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => { module.exports = composePlugins(withNx(), (config) => {
// Update the webpack config as needed here. config.target = 'electron-main'
// e.g. `config.plugins.push(new MyPlugin())` config.devtool = 'source-map'
config.mode = 'production'
// add fallback for node modules config.output = {
config.resolve.fallback = { path: __dirname + '/.webpack/main',
...config.resolve.fallback, filename: 'index.js',
"crypto": require.resolve("crypto-browserify"), libraryTarget: 'commonjs2',
"stream": require.resolve("stream-browserify"),
"path": require.resolve("path-browserify"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
"constants": require.resolve("constants-browserify"),
"os": false, //require.resolve("os-browserify/browser"),
"timers": false, // require.resolve("timers-browserify"),
"zlib": require.resolve("browserify-zlib"),
"fs": false,
"module": false,
"tls": false,
"net": false,
"readline": false,
"child_process": false,
"buffer": require.resolve("buffer/"),
"vm": require.resolve('vm-browserify'),
}
// add externals
config.externals = {
...config.externals,
solc: 'solc',
} }
// add public path
config.output.publicPath = '/'
// add copy & provide plugin
config.plugins.push( config.plugins.push(
new webpack.ProvidePlugin({ new webpack.DefinePlugin({
Buffer: ['buffer', 'Buffer'], MAIN_WINDOW_WEBPACK_ENTRY:`\`file://$\{require('path').resolve(__dirname, '..', 'renderer', 'remix-ide', 'index.html')}\``,
url: ['url', 'URL'], 'process.env.MAIN_WINDOW_WEBPACK_ENTRY': `\`file://$\{require('path').resolve(__dirname, '..', 'renderer', 'remix-ide', 'index.html')}\``,
process: 'process/browser',
}) })
) )
config.module.rules = [
// souce-map loader // Add support for native node modules
config.module.rules.push({ {
test: /\.js$/, // We're specifying native_modules in the test because the asset relocator loader generates a
use: ["source-map-loader"], // "fake" .node file which is really a cjs file.
enforce: "pre" test: /native_modules[/\\].+\.node$/,
}) use: 'node-loader',
},
config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings {
test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
parser: { amd: false },
// set minimizer use: {
config.optimization.minimizer = [ loader: '@vercel/webpack-asset-relocator-loader',
new TerserPlugin({ options: {
parallel: true, outputAssetBase: 'native_modules',
terserOptions: {
ecma: 2015,
compress: false,
mangle: false,
format: {
comments: false,
}, },
}, },
extractComments: false, },
}), {
new CssMinimizerPlugin(), test: /\.tsx?$/,
exclude: /(node_modules|\.webpack)/,
use: {
loader: 'ts-loader',
options: {
transpileOnly: true,
},
},
},
]; ];
config.watchOptions = {
ignored: /node_modules/ config.node = {
__dirname: false,
__filename: false,
} }
console.log('config', config)
return config; return config;
}); });

File diff suppressed because it is too large Load Diff

@ -34,6 +34,7 @@ export function urlFromVersion (version) {
* checks a compiler whitelist, browser support and OS. * checks a compiler whitelist, browser support and OS.
*/ */
export function canUseWorker (selectedVersion) { export function canUseWorker (selectedVersion) {
console.log('canUseWorker', selectedVersion)
if (selectedVersion.startsWith('http')) { if (selectedVersion.startsWith('http')) {
return browserSupportWorker() return browserSupportWorker()
} }
@ -51,6 +52,7 @@ export function canUseWorker (selectedVersion) {
} }
function browserSupportWorker () { function browserSupportWorker () {
return true
return document ? document.location.protocol !== 'file:' && Worker !== undefined : false return document ? document.location.protocol !== 'file:' && Worker !== undefined : false
} }

@ -112,7 +112,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React.
await basicWorkspaceInit(workspaces, workspaceProvider) await basicWorkspaceInit(workspaces, workspaceProvider)
} }
} else await basicWorkspaceInit(workspaces, workspaceProvider) } else await basicWorkspaceInit(workspaces, workspaceProvider)
} else if (isElectron()) { } else if (isElectron() && false) {
plugin.call('notification', 'toast', `connecting to localhost...`) plugin.call('notification', 'toast', `connecting to localhost...`)
await basicWorkspaceInit(workspaces, workspaceProvider) await basicWorkspaceInit(workspaces, workspaceProvider)
await plugin.call('manager', 'activatePlugin', 'remixd') await plugin.call('manager', 'activatePlugin', 'remixd')

@ -3,6 +3,7 @@
"version": "0.34.0-dev", "version": "0.34.0-dev",
"license": "MIT", "license": "MIT",
"description": "Ethereum Remix Monorepo", "description": "Ethereum Remix Monorepo",
"main": "index.js",
"keywords": [ "keywords": [
"ethereum", "ethereum",
"solidity", "solidity",
@ -52,6 +53,9 @@
"publish:libs": "yarn run build:libs && lerna publish --skip-git && yarn run bumpVersion:libs", "publish:libs": "yarn run build:libs && lerna publish --skip-git && yarn run bumpVersion:libs",
"publishDev:libs": "yarn run build:libs && lerna publish --npm-tag alpha --skip-git && yarn run bumpVersion:libs", "publishDev:libs": "yarn run build:libs && lerna publish --npm-tag alpha --skip-git && yarn run bumpVersion:libs",
"build:e2e": "node apps/remix-ide-e2e/src/buildGroupTests.js && tsc -p apps/remix-ide-e2e/tsconfig.e2e.json", "build:e2e": "node apps/remix-ide-e2e/src/buildGroupTests.js && tsc -p apps/remix-ide-e2e/tsconfig.e2e.json",
"serve:desktop:dist": "yarn nx build remixdesktop && NX_DESKTOP_FROM_DIST=true nx build remix-ide --configuration=desktop && cp -r dist/apps/remix-ide apps/remixdesktop/.webpack/renderer && yarn electron apps/remixdesktop/.webpack/main",
"build:desktop": "yarn nx build remixdesktop && NX_DESKTOP_FROM_DIST=true nx build remix-ide --configuration=desktop && cp -r dist/apps/remix-ide apps/remixdesktop/.webpack/renderer && cd apps/remixdesktop/ && yarn package",
"serve:desktop:webpack": "yarn nx build remixdesktop && yarn serve && yarn electron apps/remixdesktop",
"babel": "babel", "babel": "babel",
"watch:e2e": "nodemon", "watch:e2e": "nodemon",
"bumpVersion:libs": "gulp & gulp syncLibVersions;", "bumpVersion:libs": "gulp & gulp syncLibVersions;",
@ -156,6 +160,7 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"deep-equal": "^1.0.1", "deep-equal": "^1.0.1",
"document-register-element": "1.13.1", "document-register-element": "1.13.1",
"electron-squirrel-startup": "^1.0.0",
"eslint-config-prettier": "^8.5.0", "eslint-config-prettier": "^8.5.0",
"ethers": "^5", "ethers": "^5",
"ethjs-util": "^0.1.6", "ethjs-util": "^0.1.6",
@ -227,6 +232,7 @@
"@babel/preset-stage-0": "^7.0.0", "@babel/preset-stage-0": "^7.0.0",
"@babel/preset-typescript": "^7.18.6", "@babel/preset-typescript": "^7.18.6",
"@babel/register": "^7.4.4", "@babel/register": "^7.4.4",
"@electron-forge/cli": "^6.1.1",
"@fortawesome/fontawesome-free": "^5.8.1", "@fortawesome/fontawesome-free": "^5.8.1",
"@monaco-editor/react": "4.4.5", "@monaco-editor/react": "4.4.5",
"@nrwl/cli": "^15.7.1", "@nrwl/cli": "^15.7.1",
@ -264,6 +270,7 @@
"@typescript-eslint/parser": "^5.40.1", "@typescript-eslint/parser": "^5.40.1",
"@uniswap/v2-core": "^1.0.1", "@uniswap/v2-core": "^1.0.1",
"@uniswap/v3-core": "^1.0.1", "@uniswap/v3-core": "^1.0.1",
"@vercel/webpack-asset-relocator-loader": "^1.7.3",
"ace-mode-lexon": "^1.*.*", "ace-mode-lexon": "^1.*.*",
"ace-mode-move": "0.0.1", "ace-mode-move": "0.0.1",
"ace-mode-solidity": "^0.1.0", "ace-mode-solidity": "^0.1.0",
@ -295,6 +302,7 @@
"css-minimizer-webpack-plugin": "^4.2.2", "css-minimizer-webpack-plugin": "^4.2.2",
"csslint": "^1.0.2", "csslint": "^1.0.2",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"electron": "^24.4.0",
"eslint": "^8.26.0", "eslint": "^8.26.0",
"eslint-config-standard": "^14.1.1", "eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.26.0",

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save