Update dependencies, remove Electron (#314)

This commit is contained in:
Piotr Rogowski 2021-12-13 22:53:59 +01:00 committed by GitHub
parent 6525db3bad
commit 59db63c513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 3968 additions and 14087 deletions

1
.gitignore vendored
View File

@ -10,7 +10,6 @@ node_modules
# production build # production build
/build /build
/out
# misc # misc
.DS_Store .DS_Store

View File

@ -51,6 +51,12 @@ Project uses shared packages (`@speedy-tuner/...`).
They are hosted using `GitHub Packages`, to install them you need to [authenticate to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages) first. They are hosted using `GitHub Packages`, to install them you need to [authenticate to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages) first.
Private token can be assing to ENV like so when running `npm install` in the same shell:
```bash
export NPM_GITHUB_TOKEN=YOUR_PRIVATE_GITHUB_TOKEN
```
### Install and run ### Install and run
```bash ```bash

View File

@ -1,7 +0,0 @@
module.exports = {
makers: [
{
name: '@electron-forge/maker-dmg'
},
],
};

17872
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,18 +9,12 @@
"type": "git", "type": "git",
"url": "https://github.com/speedy-tuner/speedy-tuner-cloud" "url": "https://github.com/speedy-tuner/speedy-tuner-cloud"
}, },
"main": "src/electron.js",
"scripts": { "scripts": {
"start": "craco start", "start": "craco start",
"build": "craco build", "build": "craco build",
"electron:compile": "tsc -p tsconfig.custom.json",
"electron:start": "npm run electron:compile && electron-forge start",
"electron:package": "npm run build && npm run electron:compile && electron-forge package",
"electron:make": "npm run build && npm run electron:compile && electron-forge make",
"test": "craco test", "test": "craco test",
"lint": "tsc && eslint --max-warnings=0 src", "lint": "tsc && eslint --max-warnings=0 src",
"lint-fix": "eslint --fix src", "lint-fix": "eslint --fix src"
"eject": "react-scripts eject"
}, },
"browserslist": { "browserslist": {
"production": [ "production": [
@ -35,77 +29,39 @@
] ]
}, },
"dependencies": { "dependencies": {
"@reduxjs/toolkit": "^1.6.1", "@reduxjs/toolkit": "^1.7.0",
"@sentry/react": "^6.13.2", "@sentry/react": "^6.16.1",
"@sentry/tracing": "^6.13.2", "@sentry/tracing": "^6.16.1",
"@speedy-tuner/types": "^0.2.0", "@speedy-tuner/types": "^0.2.0",
"antd": "^4.16.13", "antd": "^4.17.3",
"d3": "^7.0.4", "d3": "^7.0.4",
"d3fc": "^15.2.4", "d3fc": "^15.2.4",
"electron-squirrel-startup": "^1.0.0",
"mlg-converter": "^0.5.1", "mlg-converter": "^0.5.1",
"pako": "^2.0.4", "pako": "^2.0.4",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-perfect-scrollbar": "^1.5.8", "react-perfect-scrollbar": "^1.5.8",
"react-redux": "^7.2.5", "react-redux": "^7.2.6",
"react-router-dom": "^5.3.0", "react-router-dom": "^5.2.1",
"react-scripts": "^4.0.3", "react-scripts": "^4.0.3",
"react-table-drag-select": "^0.3.1", "react-table-drag-select": "^0.3.1",
"recharts": "^2.1.4" "recharts": "^2.1.6"
}, },
"devDependencies": { "devDependencies": {
"@craco/craco": "^6.3.0", "@craco/craco": "^6.4.3",
"@electron-forge/cli": "^6.0.0-beta.61",
"@electron-forge/maker-deb": "^6.0.0-beta.61",
"@electron-forge/maker-dmg": "^6.0.0-beta.61",
"@electron-forge/maker-rpm": "^6.0.0-beta.61",
"@electron-forge/maker-squirrel": "^6.0.0-beta.61",
"@electron-forge/maker-zip": "^6.0.0-beta.61",
"@speedy-tuner/eslint-config": "^0.1.1", "@speedy-tuner/eslint-config": "^0.1.1",
"@types/d3": "^7.0.0", "@types/d3": "^7.0.0",
"@types/node": "^16.9.6", "@types/node": "^16.11.12",
"@types/pako": "^1.0.2", "@types/pako": "^1.0.2",
"@types/react": "^17.0.24", "@types/react": "^17.0.37",
"@types/react-dom": "^17.0.9", "@types/react-dom": "^17.0.11",
"@types/react-redux": "^7.1.18", "@types/react-redux": "^7.1.20",
"@types/react-router-dom": "^5.3.0", "@types/react-router-dom": "^5.3.2",
"electron": "^15.0.0",
"eslint-plugin-modules-newline": "^0.0.6", "eslint-plugin-modules-newline": "^0.0.6",
"eslint-plugin-prettier": "^4.0.0", "eslint-plugin-prettier": "^4.0.0",
"less-loader": "^6.1.0", "less-loader": "^6.1.0",
"prettier": "^2.4.1", "prettier": "^2.5.1",
"typescript": "^4.4.3", "typescript": "^4.5.3",
"worker-loader": "^3.0.8" "worker-loader": "^3.0.8"
},
"config": {
"forge": {
"packagerConfig": {
"name": "SpeedyTuner",
"icon": "./public/icons/icon"
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "SpeedyTuner"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
]
}
} }
} }

View File

@ -23,16 +23,7 @@ html, body {
margin: 20px; margin: 20px;
} }
.electron-draggable {
-webkit-app-region: drag;
}
.electron-not-draggable {
-webkit-app-region: no-drag;
}
.app-top-bar { .app-top-bar {
.electron-draggable;
// border-bottom-width: 1px; // border-bottom-width: 1px;
// border-bottom-color: @border-color-split; // border-bottom-color: @border-color-split;
// border-bottom-style: solid; // border-bottom-style: solid;

View File

@ -169,7 +169,7 @@ const TopBar = () => {
</Radio.Group> </Radio.Group>
</Col> </Col>
<Col span={12} md={8} sm={8} style={{ textAlign: 'right' }}> <Col span={12} md={8} sm={8} style={{ textAlign: 'right' }}>
<Space className="electron-not-draggable"> <Space>
<Tooltip title={ <Tooltip title={
<> <>
<Typography.Text keyboard>{isMac ? '⌘' : 'CTRL'}</Typography.Text> <Typography.Text keyboard>{isMac ? '⌘' : 'CTRL'}</Typography.Text>

View File

@ -1,65 +0,0 @@
import {
app,
BrowserWindow,
} from 'electron';
import path from 'path';
const isDev = !app.isPackaged;
let main: BrowserWindow;
// let splash: BrowserWindow | null;
// const createSplash = () => {
// splash = new BrowserWindow({
// width: 200,
// height: 400,
// frame: false,
// transparent: true,
// resizable: false,
// });
// splash.loadURL(`file://${path.join(__dirname, '../public/splash.html')}`);
// splash.on('closed', () => {
// splash = null;
// });
// splash.webContents.on('did-finish-load', () => {
// splash.show();
// });
// };
function createMain() {
main = new BrowserWindow({
title: 'SpeedyTuner',
width: 1400,
height: 1000,
show: false,
titleBarStyle: 'hiddenInset',
backgroundColor: '#222629',
});
main.setMenuBarVisibility(false);
const startURL = isDev
? 'http://localhost:3000'
: `file://${path.join(__dirname, '../build/index.html')}`;
main.loadURL(startURL);
main.on('closed', () => {
main = null as any;
});
main.once('ready-to-show', () => main.show());
// main.webContents.on('did-finish-load', () => {
// if (splash) {
// splash.close();
// }
// main.show();
// });
}
app.on('ready', () => {
// createSplash();
createMain();
});

View File

@ -1,17 +0,0 @@
{
"extends": "./tsconfig.json",
"target": "ES2019",
"lib": [
"ES2019"
],
"compilerOptions": {
"module": "commonjs",
"noEmit": false
},
"files": [
"src/electron.ts"
],
"include": [
"src/parser"
]
}