This repository has been archived by the owner on Mar 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.js
67 lines (62 loc) · 1.84 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
'use strict';
var os = require('os');
var _i18n = require('i18n');
var path = require('path');
var EventEmitter = require('wolfy87-eventemitter');
var _ee = new EventEmitter();
var AppConfig = {
basePath: path.join(__dirname, path.sep) + path.sep,
htmlPath: path.join(__dirname, 'src', 'html') + path.sep,
rendererPath: path.join(__dirname, 'src', 'renderer') + path.sep,
browserSrcPath: path.join(__dirname, 'src', 'browser') + path.sep,
commonsPath : path.join(__dirname, 'src', 'common') + path.sep,
srcPath : path.join(__dirname, 'src') + path.sep,
dialogsPath : __dirname,
partialsPath : __dirname,
isDevelopment: true,
database: {
path: path.join(__dirname, 'db') + path.sep,
notes: 'notes.db',
notebooks: 'notebooks.db'
},
i18nConfiguration: {
locales: ['en'],
directory: path.join(__dirname, 'locales'),
defaultLocale: 'en',
objectNotation: true
},
defaultNotebook : {
'name' : 'Daily',
'type' : 'task',
'shrinkNotes' : false,
'createdOn' : null,
'modifiedOn' : null
},
dateFormat : 'DD, dd MM, yyyy',
getNotebookContentID : function(notebookDbID) {
return 'notebook_' + notebookDbID;
},
getNotebookHeaderID : function(notebookDbID) {
return 'notebookHeader_' + notebookDbID;
},
getDatepickerConfig : function() {
return {
todayBtn: true,
orientation: 'top',
todayHighlight: true,
autoclose: true,
format: AppConfig.dateFormat
};
},
regexForTime: /\$\d{1,3}(\.\d{1,3})? \w{1,4}\$/,
maxPastDate: 60,
getEventEmitter: function() {
return _ee;
}
};
AppConfig.partialsPath = path.join(AppConfig.htmlPath, 'partials') + path.sep;
AppConfig.dialogsPath = path.join(AppConfig.htmlPath, 'dialogs') + path.sep;
AppConfig.logPath = path.join(AppConfig.basePath, 'logs') + path.sep;
AppConfig.settingsPath = path.join(AppConfig.basePath, 'settings.json');
AppConfig.EOL = os.EOL;
module.exports = AppConfig;