mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-03-03 12:31:04 -08:00
26 lines
840 B
JavaScript
26 lines
840 B
JavaScript
const isDev = require('electron-is-dev');
|
|
const path = require('path');
|
|
const os = require('os');
|
|
|
|
const REACT_PATH = isDev
|
|
? 'http://localhost:3000'
|
|
: `file://${path.resolve(__dirname, '..', '..', 'build', 'index.html')}`;
|
|
// .app/Contents/Resources/wiki/
|
|
const TIDDLYWIKI_TEMPLATE_FOLDER_PATH = isDev
|
|
? path.resolve(__dirname, '..', '..', 'template', 'wiki')
|
|
: path.resolve(process.resourcesPath, '..', 'wiki');
|
|
const TIDDLERS_PATH = 'tiddlers';
|
|
const ICON_PATH = isDev
|
|
? path.resolve(__dirname, '..', 'icon.png')
|
|
: `file://${path.resolve(__dirname, '..', 'icon.png')}`;
|
|
const CHROME_ERROR_PATH = 'chrome-error://chromewebdata/';
|
|
const DESKTOP_PATH = path.join(os.homedir(), 'Desktop');
|
|
|
|
module.exports = {
|
|
REACT_PATH,
|
|
TIDDLYWIKI_TEMPLATE_FOLDER_PATH,
|
|
TIDDLERS_PATH,
|
|
ICON_PATH,
|
|
CHROME_ERROR_PATH,
|
|
DESKTOP_PATH,
|
|
};
|