-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpreload.js
More file actions
30 lines (26 loc) · 780 Bytes
/
Copy pathpreload.js
File metadata and controls
30 lines (26 loc) · 780 Bytes
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
const prompt = require('electron-prompt');
const jsdom = require('jsdom');
const NoteManager = require('./modules/client/libraries/NoteManager');
const Fetch = require('./modules/client/libraries/Fetch');
const exec = require('./modules/client/libraries/exec');
const npmModule = require('./modules/client/libraries/RequireModule');
const lodash = require('lodash');
const fixPath = require('fix-path');
fixPath();
window.prompt = prompt;
window._ = lodash
window._mercury = {
utils: {
lodash: lodash,
jsdom,
npmModule,
exec: exec.exec,
spawn: exec.spawn
},
system: {},
appRender: {}
};
// import fetch
window._mercury.utils['Fetch'] = Fetch;
window._mercury.utils['NoteManager'] = NoteManager;
window._mercury.system['NoteManager'] = NoteManager;