Skip to content

Commit d025ad8

Browse files
Fixed config directory for Windows and made config check work
1 parent 05c9e35 commit d025ad8

File tree

6 files changed

+3
-98
lines changed

6 files changed

+3
-98
lines changed

.eslintignore

Lines changed: 0 additions & 33 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
3232
"build:renderer": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
3333
"postinstall": "ts-node .erb/scripts/check-native-dep.js && electron-builder install-app-deps && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts",
34-
"lint": "cross-env NODE_ENV=development eslint . --ext .js,.jsx,.ts,.tsx",
3534
"package": "ts-node ./.erb/scripts/clean.js dist && npm run build && electron-builder build --publish never",
3635
"prepare": "husky install",
3736
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
@@ -41,35 +40,7 @@
4140
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
4241
"test": "jest"
4342
},
44-
"lint-staged": {
45-
"*.{js,jsx,ts,tsx}": [
46-
"cross-env NODE_ENV=development eslint --cache"
47-
],
48-
"*.json,.{eslintrc,prettierrc}": [
49-
"prettier --ignore-path .eslintignore --parser json --write"
50-
],
51-
"*.{css,scss}": [
52-
"prettier --ignore-path .eslintignore --single-quote --write"
53-
],
54-
"*.{html,md,yml}": [
55-
"prettier --ignore-path .eslintignore --single-quote --write"
56-
]
57-
},
5843
"browserslist": [],
59-
"prettier": {
60-
"singleQuote": true,
61-
"overrides": [
62-
{
63-
"files": [
64-
".prettierrc",
65-
".eslintrc"
66-
],
67-
"options": {
68-
"parser": "json"
69-
}
70-
}
71-
]
72-
},
7344
"jest": {
7445
"moduleDirectories": [
7546
"node_modules",

src/main/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { resolveHtmlPath } from './util';
1818

1919
import defaultConfig from './defaultConfig';
2020

21-
const HOME : string = process.platform === 'darwin' ? process.env.HOME || "/" : `${process.env.HOMEDRIVE}${process.env.HOMEPATH}/AppData/DubEditor`;
21+
const HOME : string = process.platform === 'darwin' ? process.env.HOME || "/" : `${process.env.HOMEDRIVE}${process.env.HOMEPATH}/AppData/Local/DubEditor`;
2222
const CONFIG_FILE : string = `${HOME}/.dub-editor-config.json`;
2323

2424
export default class AppUpdater {

src/renderer/routes/Config.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ const Config = (props) => {
3131

3232
if (filePath) {
3333
let newConfig = updateConfig(field, filePath);
34+
let result = await window.api.send("fileExists", filePath + "/StreamingAssets");
3435

35-
if (!window.api.send("fileExists", filePath + "/StreamingAssets")) {
36+
if (!result) {
3637
setError("The directory you set doesn't contain the StreamingAssets folder");
3738
return;
3839
}

0 commit comments

Comments
 (0)