This repository was archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreateManifest.js
59 lines (57 loc) · 1.5 KB
/
createManifest.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
/* eslint-disable */
const fs = require('fs');
const isProduction = process.argv.includes('--env=production');
const basePath = isProduction ? '.' : 'build';
const manifest = {
manifest_version: 1,
type: 'WebApp',
meta: {
name: 'overwolf-react',
version: '2.0.0',
'minimum-overwolf-version': '0.98.00',
author: 'Hacksore',
icon: `${basePath}/img/IconMouseOver.png`,
icon_gray: `${basePath}/img/IconMouseNormal.png`,
description: 'A CRA boilerplate for using react for overlays',
},
permissions: ['Hotkeys'],
data: {
hotkeys: {
open_ui: {
title: 'Open the custom UI',
'action-type': 'custom',
passthrough: true,
default: 'Ctrl+1',
},
},
start_window: 'in_game_overlay',
windows: {
in_game_overlay: {
in_game_only: true,
debug_url: 'http://localhost:3000',
file: `${basePath}/index.html`,
transparent: true,
clickthrough: false,
size: {
width: 300,
height: 600,
},
start_position: {
top: 10,
left: 10,
},
},
},
game_events: [5426],
game_targeting: { type: 'dedicated', game_ids: [5426] },
launch_events: [
{
event: 'GameLaunch',
event_data: { game_ids: [5426, 10902, 21584] },
start_minimized: false,
},
],
},
};
const manifestPath = isProduction ? 'build' : '.';
fs.writeFileSync(`${manifestPath}/manifest.json`, JSON.stringify(manifest, null, 2));