mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 12:13:57 +00:00
refactor
This commit is contained in:
parent
b936cb9e25
commit
c203758fd8
2
Procfile
2
Procfile
@ -1,2 +1,2 @@
|
||||
react: yarn react-start
|
||||
electron: node src/electron-wait-react
|
||||
electron: yarn wait-electron
|
||||
|
@ -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",
|
||||
|
@ -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'),
|
@ -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
12
src/ui/index.js
Normal 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();
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Loading…
Reference in New Issue
Block a user