Add convenience functions, update Docker setup, and integrate Webpack for building WebRTC internals exporter (#3)
All checks were successful
Build and Push Docker Image / build (push) Successful in 12m31s

Reviewed-on: #3
Co-authored-by: Mirko Milovanovic <mir_ko@me.com>
Co-committed-by: Mirko Milovanovic <mir_ko@me.com>
This commit is contained in:
2025-02-21 11:21:14 +00:00
committed by kobim
parent 84479c786a
commit 5c92020169
20 changed files with 9772 additions and 72 deletions

View File

@@ -0,0 +1,26 @@
const { execSync } = require('child_process');
const args = process.argv.slice(2);
let url = '';
args.forEach((arg, index) => {
if (arg === '-u' || arg === '--url') {
url = args[index + 1];
} else if (arg === '-h' || arg === '--help') {
console.log('Usage: npm run build -- [-u|--url <url>]');
console.log('Options:');
console.log(' -u, --url <url> URL to use for the extension collector server');
console.log(' -h, --help Display this help message');
process.exit(0);
} else if (arg.startsWith('-')) {
console.error(`Unrecognized argument: ${arg}`);
process.exit(1);
}
});
if (url) {
console.log(`Building with URL: ${url}`);
execSync(`webpack --env URL=${url}`, { stdio: 'inherit' });
} else {
execSync('webpack', { stdio: 'inherit' });
}