-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.config.js
91 lines (90 loc) · 2.79 KB
/
forge.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* eslint-disable no-async-promise-executor */
/* eslint-disable @typescript-eslint/no-var-requires */
const { version } = require("./package.json")
const { execSync } = require("child_process")
const { generateIcons } = require("./scripts/generate-icons.js")
const path = require("path")
module.exports = {
packagerConfig: {
icon: "./build/icon",
ignore: [
"\\.git",
"\\.scss",
"\\.ts",
"\\.tsx",
"\\.eslint*",
"/build",
"/\\.vscode",
"tsconfig.json",
],
},
makers: [
{
name: "@electron-forge/maker-squirrel",
config: {
name: "dicionario",
setupIcon: "./build/icon.ico",
setupExe: `dicionario-${version}-setup.exe`,
iconUrl:
"https://raw.githubusercontent.com/ArthurLobopro/dicionario.js/main/build/icon.ico",
},
},
{
name: "@electron-forge/maker-zip",
platforms: ["darwin"],
},
{
name: "@electron-forge/maker-deb",
config: {
name: "dicionario.js",
productName: "Dicionario.js",
categories: ["Utility", "Education"],
description:
"Dicionário onde você cadastra suas próprias palavras e definições.",
genericName: "Dicionario.js",
icon: path.resolve(__dirname, "./assets/icon.png"),
options: {
maintainer: "Arthur Lobo",
homepage:
"https://github.com/ArthurLobopro/dicionario.js#readme",
},
},
platforms: ["linux"],
},
{
name: "@electron-forge/maker-rpm",
config: {},
platforms: [],
},
],
publishers: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "ArthurLobopro",
name: "dicionario.js",
},
prerelease: false,
draft: true,
},
},
],
hooks: {
async generateAssets() {
return new Promise(async (resolve, reject) => {
try {
console.log("Generating icons...")
await generateIcons()
console.log("Compiling TypeScript...")
execSync("yarn tsc")
console.log("Compiling SASS...")
execSync("yarn sass-compiler --compile")
resolve()
} catch (error) {
reject(error)
}
})
},
},
}