64fe9dbfb2
* Clean logs on startup; install server-side testing/linting * Add eslint config, make all of app/ conform to its demands * Add Node.js testing and linting to CI * Lock project to Node.js 7.9.0, used by Electron 1.7.10 * New eslint error: trailing commas in function argumensts Node 7.9.0 doesn't like trailing commas, but Electron does * Move electron to devDependency, tell eslint it's built-in
24 lines
574 B
JavaScript
24 lines
574 B
JavaScript
const path = require('path');
|
|
|
|
const { app } = require('electron');
|
|
const ElectronConfig = require('electron-config');
|
|
|
|
const config = require('./config');
|
|
|
|
|
|
// use a separate data directory for development
|
|
if (config.has('storageProfile')) {
|
|
const userData = path.join(
|
|
app.getPath('appData'),
|
|
`Signal-${config.get('storageProfile')}`
|
|
);
|
|
|
|
app.setPath('userData', userData);
|
|
}
|
|
|
|
console.log(`userData: ${app.getPath('userData')}`);
|
|
|
|
// this needs to be below our update to the appData path
|
|
const userConfig = new ElectronConfig();
|
|
|
|
module.exports = userConfig;
|