mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 11:23:59 +00:00
refactor
This commit is contained in:
2
Procfile
2
Procfile
@@ -1,2 +1,2 @@
|
|||||||
react: yarn react-start
|
react: yarn react-start
|
||||||
electron: node src/electron-wait-react
|
electron: yarn wait-electron
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"electron-dist": "electron-builder",
|
"electron-dist": "electron-builder",
|
||||||
"start": "nf start",
|
"start": "nf start",
|
||||||
"serve": "node src/api/index.js",
|
"serve": "node src/api/index.js",
|
||||||
|
"wait-electron": "node src/app/electron-wait-react",
|
||||||
"postinstall": "electron-builder install-app-deps"
|
"postinstall": "electron-builder install-app-deps"
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
"last 1 safari version"
|
"last 1 safari version"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"main": "src/electron.js",
|
"main": "src/app/electron.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^7.1.7",
|
"electron": "^7.1.7",
|
||||||
"electron-builder": "^21.2.0",
|
"electron-builder": "^21.2.0",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function createWindow() {
|
|||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
mainWindow = new BrowserWindow({width: 800, height: 600});
|
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({
|
const startUrl = process.env.ELECTRON_START_URL || url.format({
|
||||||
pathname: path.join(__dirname, '/../build/index.html'),
|
pathname: path.join(__dirname, '/../build/index.html'),
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import './index.css';
|
import './ui/index.css';
|
||||||
import App from './App';
|
import App from './ui/App';
|
||||||
import * as serviceWorker from './serviceWorker';
|
import * as serviceWorker from './ui/serviceWorker';
|
||||||
|
|
||||||
ReactDOM.render(<App />, document.getElementById('root'));
|
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 |
Reference in New Issue
Block a user