Skip to content

Commit

Permalink
fix: minor updates to the build script and assets (#2113)
Browse files Browse the repository at this point in the history
  • Loading branch information
smalluban authored Dec 2, 2024
1 parent 0e551f5 commit 7bf56c2
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 14 deletions.
29 changes: 24 additions & 5 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,19 @@ const manifest = JSON.parse(
readFileSync(resolve(options.srcDir, `manifest.${argv.target}.json`), 'utf8'),
);

// Add flags to manifest
if (argv.debug) manifest.debug = true;
if (argv.staging) manifest.staging = true;
// --- Add flags ---

if (argv.debug) {
manifest.debug = true;
}

if (argv.staging) {
// Force re-download of resources to be sure we have the latest version
// when building with staging CDN
argv.clean = true;

manifest.staging = true;
}

// --- Download rule resources ---

Expand Down Expand Up @@ -104,8 +114,17 @@ if (!existsSync(licensesPath)) {
.toString()
.replace(
'<html>',
'<html lang="en">\n<head>\n<meta charset="utf-8">\n</head>\n',
),
`
<html lang="en">
<head>
<title>Software Licenses</title>
<meta charset="utf-8">
<link rel="icon" type="image/png" href="/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/assets/favicon.svg" />
</head>
`,
)
.trim(),
);
}

Expand Down
6 changes: 4 additions & 2 deletions src/pages/notifications/opera-serp.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>More ad blocking available</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>More ad blocking available</title>
<link rel="icon" type="image/png" href="/ui/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/ui/assets/favicon.svg" />
<script src="./opera-serp.js" type="module" async></script>
</head>
<body></body>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/notifications/youtube.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Youtube Wall</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Youtube Wall</title>
<link rel="icon" type="image/png" href="/ui/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/ui/assets/favicon.svg" />
<script src="./youtube.js" type="module" async></script>
</head>
<body></body>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/onboarding/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>Welcome to Ghostery</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Welcome to Ghostery</title>
<link rel="icon" type="image/png" href="/ui/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/ui/assets/favicon.svg" />
<script src="./index.js" type="module"></script>
</head>
<body></body>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/panel/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<title>Ghostery panel</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Ghostery panel</title>
<script type="module" src="./index.js"></script>
<meta content="light dark" name="color-scheme" />
<link rel="icon" type="image/png" href="/ui/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/ui/assets/favicon.svg" />
<script type="module" src="./index.js"></script>
</head>
<body tabindex="0"></body>
</html>
4 changes: 3 additions & 1 deletion src/pages/settings/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>Ghostery settings</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Ghostery settings</title>
<link rel="icon" type="image/png" href="/ui/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/ui/assets/favicon.svg" />
<script type="module" src="./index.js"></script>
</head>
<body></body>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/trackers-preview/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<title>Trackers Preview</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Trackers Preview</title>
<link rel="icon" type="image/png" href="/ui/assets/favicon.png" />
<link rel="icon" type="image/svg+xml" href="/ui/assets/favicon.svg" />
<script src="./index.js" type="module"></script>
</head>
<body></body>
Expand Down
Binary file added src/ui/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/ui/assets/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7bf56c2

Please sign in to comment.