-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmanifest.js
36 lines (32 loc) · 884 Bytes
/
manifest.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
/* Ignore parserOptions.project warning.
This file is only run pre-build */
const fs = require('fs');
const path = require('path');
const basePath = process.env.DEVFILE_VIEWER_ROOT ? process.env.DEVFILE_VIEWER_ROOT : '';
const manifest = {
theme_color: '#151515',
background_color: '#F0F0F0',
display: 'standalone',
scope: basePath,
start_url: basePath,
name: 'Registry Viewer',
short_name: 'Registry Viewer',
icons: [
{
src: 'images/icons/pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'images/icons/pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
};
function main() {
const manifestJSON = JSON.stringify(manifest, null, 2);
const filePath = path.join(process.cwd(), 'public', 'manifest.json');
fs.writeFileSync(filePath, manifestJSON, { encoding: 'utf8' });
}
main();