Split configuration into low and high traffic files
Also, we're now handling config ourselves instead of using electron-config and config dependencies.
This commit is contained in:
parent
f59ec92fef
commit
998c35dcb3
9 changed files with 112 additions and 103 deletions
|
@ -1,11 +1,11 @@
|
|||
const path = require('path');
|
||||
|
||||
const { app } = require('electron');
|
||||
const ElectronConfig = require('electron-config');
|
||||
|
||||
const { start } = require('./base_config');
|
||||
const config = require('./config');
|
||||
|
||||
// use a separate data directory for development
|
||||
// Use separate data directory for development
|
||||
if (config.has('storageProfile')) {
|
||||
const userData = path.join(
|
||||
app.getPath('appData'),
|
||||
|
@ -17,7 +17,9 @@ if (config.has('storageProfile')) {
|
|||
|
||||
console.log(`userData: ${app.getPath('userData')}`);
|
||||
|
||||
// this needs to be below our update to the appData path
|
||||
const userConfig = new ElectronConfig();
|
||||
const userDataPath = app.getPath('userData');
|
||||
const targetPath = path.join(userDataPath, 'config.json');
|
||||
|
||||
const userConfig = start('user', targetPath);
|
||||
|
||||
module.exports = userConfig;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue