This commit is contained in:
Jan Prochazka 2019-12-25 22:44:39 +01:00
parent b936cb9e25
commit c203758fd8
14 changed files with 19 additions and 6 deletions

View File

@ -1,2 +1,2 @@
react: yarn react-start
electron: node src/electron-wait-react
electron: yarn wait-electron

View File

@ -30,6 +30,7 @@
"electron-dist": "electron-builder",
"start": "nf start",
"serve": "node src/api/index.js",
"wait-electron": "node src/app/electron-wait-react",
"postinstall": "electron-builder install-app-deps"
},
"eslintConfig": {
@ -47,7 +48,7 @@
"last 1 safari version"
]
},
"main": "src/electron.js",
"main": "src/app/electron.js",
"devDependencies": {
"electron": "^7.1.7",
"electron-builder": "^21.2.0",

View File

@ -16,7 +16,7 @@ function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600});
const apiProcess = fork(path.join(__dirname, '/api/index.js'));
const apiProcess = fork(path.join(__dirname, '../api/index.js'));
const startUrl = process.env.ELECTRON_START_URL || url.format({
pathname: path.join(__dirname, '/../build/index.html'),

View File

@ -1,8 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import './ui/index.css';
import App from './ui/App';
import * as serviceWorker from './ui/serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));

12
src/ui/index.js Normal file
View File

@ -0,0 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB