UNPKG

@pierrad/web-carbon-analyzer

Version:

A tool to measure the carbon footprint of websites using CO2.js

61 lines 1.87 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config = { // Browser settings browser: { type: 'chromium', // 'chromium', 'firefox', or 'webkit' headless: true, timeout: 60000, // 60 seconds viewport: { width: 1920, height: 1080 }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', waitForNetworkIdle: true, networkIdleTimeout: 5000, // 5 seconds }, // User behavior simulation userBehavior: { scrollDepth: 5, // Number of page-heights to scroll scrollDelay: 1000, // Wait 1 second between scrolls maxScrollTime: 30000, // Maximum time for scrolling (30 seconds) }, // CO2 calculation settings co2: { model: 'swd', // 'swd' for Sustainable Web Design, '1byte' for 1byte model includeGreenHostingCheck: true, }, // Output settings output: { format: 'json', includeResourceDetails: true, includeComparisons: true, }, // Logging settings logging: { level: 'info', // 'error', 'warn', 'info', 'verbose', 'debug', 'silly' console: true, file: false, filePath: './logs/carbon-analyzer.log', }, // Lighthouse settings lighthouse: { enabled: false, // Disabled by default port: 9222, // Default port for remote debugging thresholds: { performance: 0, accessibility: 0, 'best-practices': 0, seo: 0 }, reports: { formats: { json: true, html: false, csv: false } } } }; exports.default = config; //# sourceMappingURL=default.js.map