-
Notifications
You must be signed in to change notification settings - Fork 0
/
forgeconfig.js
55 lines (53 loc) · 1.28 KB
/
forgeconfig.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
const rollup = require('rollup');
const babel = require('@babel/core');
const fs = require('fs');
const requireFromString = require('require-from-string');
module.exports = {
make_targets: {
win32: [
'squirrel',
'zip',
],
darwin: [
'zip',
'dmg',
],
linux: [
'zip',
'deb',
'rpm',
'flatpak',
'snap',
],
},
electronPackagerConfig: {
packageManager: 'npm',
},
electronWinstallerConfig: {
name: 'press-f-to-pay-respects',
},
electronInstallerDebian: {},
electronInstallerRedhat: {},
github_repository: {
owner: '',
name: '',
},
windowsStoreConfig: {
packageName: 'cz.krystof1119.f',
name: 'Press F to pay respects.',
},
hooks: {
generateAssets: async () => {
/* return new Promise(function (resolve) {
resolve(rollup.rollup());
}); */
// babel.transform(await , { presets: ['@babel/preset-env'] }).code
console.log('Bundling Babel JavaScript, please wait...');
const rollupConfig = requireFromString(babel.transform(
fs.readFileSync('rollup.config.js'),
{ presets: ['@babel/preset-env'] }).code);
const bundle = await rollup.rollup(rollupConfig.default);
await bundle.write(rollupConfig.default.output);
},
},
};