-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
31 lines (27 loc) · 798 Bytes
/
index.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
var nativefier = require("nativefier").default;
var _today = new Date();
var version = `${_today.getFullYear().toString().substr(2, 4)}.${
_today.getMonth() + 1
}.${_today.getDate()}.${_today.getMilliseconds()}`;
var options = {
name: "Discord M1",
targetUrl: "https://discord.com/app",
appVersion: version,
out: ".",
icon: "./static/discord.icns",
browserwindowOptions:
'{ "fullscreenable": "true", "simpleFullscreen": "false" }',
darwinDarkModeSupport: true,
backgroundColor: "36393f",
titleBarStyle: "hiddenInset",
enableEs3Apis: true,
disableContextMenu: false,
inject: ["./static/discord.css"],
};
nativefier(options, (error, appPath) => {
if (error) {
console.error(error);
return;
}
console.log("Electron App has been Built to", appPath);
});