diff --git a/packages/fether-electron/package.json b/packages/fether-electron/package.json index c1371b5ec3360e6da4c0dc1a338ce1229844d4e5..f45e526eeaf959867cebd68d27678b9dcb00bb29 100644 --- a/packages/fether-electron/package.json +++ b/packages/fether-electron/package.json @@ -34,7 +34,7 @@ "lint": "semistandard 'src/**/*.js' --parser babel-eslint", "package": "electron-builder", "release": "electron-builder", - "start": "electron-webpack dev --ui-dev --light --ws-origins all", + "start": "cross-env ELECTRON_START_URL=http://localhost:3000 electron-webpack dev --light --ws-origins all", "test": "echo Skipped." }, "dependencies": { diff --git a/packages/fether-electron/src/main/cli/index.js b/packages/fether-electron/src/main/cli/index.js index ff27b4f015e04e4f0f940e9776aadf775aa5065d..27d2ef5d243098734eef31eb56b9af5be31c4cbc 100644 --- a/packages/fether-electron/src/main/cli/index.js +++ b/packages/fether-electron/src/main/cli/index.js @@ -26,10 +26,6 @@ cli '--no-run-parity', `${productName} will not attempt to run the locally installed parity.` ) - .option( - '--ui-dev', - `${productName} will load http://localhost:3000. WARNING: Only use this is you plan on developing on ${productName}.` - ) .option( '--ws-interface ', `Specify the hostname portion of the WebSockets server ${productName} will connect to. IP should be an interface's IP address. (default: 127.0.0.1)` diff --git a/packages/fether-electron/src/main/index.js b/packages/fether-electron/src/main/index.js index 56582ec9bda6ce281b7c557385b4687947d70b4f..24624ee08ef4447d30d3c03a14188a6aaa679057 100644 --- a/packages/fether-electron/src/main/index.js +++ b/packages/fether-electron/src/main/index.js @@ -10,7 +10,6 @@ import path from 'path'; import url from 'url'; import addMenu from './menu'; -import { cli } from './cli'; import { doesParityExist } from './operations/doesParityExist'; import fetchParity from './operations/fetchParity'; import handleError from './operations/handleError'; @@ -35,20 +34,16 @@ function createWindow () { .then(() => runParity(mainWindow)) .catch(handleError); // Errors should be handled before, this is really just in case - if (cli.uiDev === true) { - // Opens http://127.0.0.1:3000 in --ui-dev mode - mainWindow.loadURL('http://127.0.0.1:3000'); - mainWindow.webContents.openDevTools(); - } else { - // Opens file:///path/to/.build/index.html in prod mode - mainWindow.loadURL( + // Opens file:///path/to/build/index.html in prod mode, or whatever is + // passed to ELECTRON_START_URL + mainWindow.loadURL( + process.env.ELECTRON_START_URL || url.format({ pathname: path.join(__static, 'build', 'index.html'), protocol: 'file:', slashes: true }) - ); - } + ); // Listen to messages from renderer process ipcMain.on('asynchronous-message', messages); diff --git a/packages/fether-react/public/index.html b/packages/fether-react/public/index.html index bd4382f1f32eaddb10de71f8659f364309d02e79..43917cd73cb41d724d72ecaf314920a227a51e0b 100644 --- a/packages/fether-react/public/index.html +++ b/packages/fether-react/public/index.html @@ -4,6 +4,7 @@ +