BTHLABS-51: Chrome Web Extension

Co-authored-by: Tomek Wójcik <labs@tomekwojcik.pl>
Co-committed-by: Tomek Wójcik <labs@tomekwojcik.pl>
This commit is contained in:
2025-09-14 06:34:43 +00:00
committed by Tomek Wójcik
parent 1a8c4bfebc
commit ab84f685c0
21 changed files with 82 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import copy from 'rollup-plugin-copy';
import {string} from 'rollup-plugin-string';
import packageJSON from './package.json' with {type: 'json'};
import manifestChrome from './src/manifest/chrome.json' with {type: 'json'};
import manifestCommon from './src/manifest/common.json' with {type: 'json'};
import manifestSafari from './src/manifest/safari.json' with {type: 'json'};
@@ -62,12 +63,17 @@ const manifestJsonOutputPlugin = () => {
...result,
...manifestSafari,
};
} else if (TARGET == 'chrome') {
result = {
...result,
...manifestChrome,
};
}
result.version = packageJSON.version;
if (IS_PRODUCTION === false) {
result.name = 'HotPocket Development';
result.name = '__MSG_extension_name_development__';
}
return JSON.stringify(result, null, 2);
@@ -78,6 +84,8 @@ const manifestJsonOutputPlugin = () => {
let OUTPUT_PATH = `dist/${TARGET}`;
if (TARGET === 'safari') {
OUTPUT_PATH = '../apple/Shared (Extension)/Resources';
} else if (IS_PRODUCTION === true) {
OUTPUT_PATH = `dist/${TARGET}-production`;
}
export default [