Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dreipol/lighthouse-config

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreipol/lighthouse-config

Basic lighthouse config

  • 0.11.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-81.4%
Maintainers
4
Weekly downloads
 
Created
Source

@dreipol/lighthouse-config

Centralized location to hold the @dreipol/lighthouse-runner default configuration

Install

npm i @dreipol/lighthouse-config

Setup

This module simply provides some default configuration. You can extend this config to your flavour. Therefore no setup for this module is required.

Config

Structure

fieldtypedefaultvalue
urlstringlocal:http://localhsot:8000 production:https://example.comThe domain/webpage that has to be analyzed.
pathsArray['/']Array of url paths. All these routes are tested and reported
chromeFlagsArray['--window-size=1200,800']Array of additional chrome flags. See all
folderstring../dreihouse-reportsDefine location to store the reports
disableEmulationbooleantrueApplay device emulation
disableThrottlingbooleantrueDisable Network and CPU throttling
saveReportbooleantrueSave report as json file for further inspections
reporters.modulesArray<string, ResultReporterInterface>['html']Current available persisters are html json and `html-dashboard
reportObjectLighthouse report configurations. See exmaples

Example

url: 'http://localhost:8000',
paths: [
    '/',
],
folder: "../dreihouse-reports",
tag: 'desktop',
chromeFlags: ['--window-size=1280,1024'],
disableEmulation: true,
disableThrottling: true,
saveReport: true,
budget: {
    dreipol: 100,
    seo: 90,
    performance: 90,
    pwa: 70,
    accessibility: 70,
    'best-practices': 70,
},
reporters: {
    modules: [
        'html',
        {
            // my custom result reporter
            key: 'FancyReporter',
            handle: (results) => {
                console.log(results);
            }
        }
    ]
},
report: {...}

Extend from the base config

You can extend the base configuration with your own configuration. This is done by creating a new config file in your project and include the base config via require. Then you can edit the Object the way you want

Example for local mobile config:

let mobileConfig = require('@dreipol/lighthouse-config/config/local/desktop');

mobileConfig.chromeFlags = ['--window-size=320,480'];
mobileConfig.disableEmulation = false;
mobileConfig.disableThrottling = false;

module.exports = mobileConfig;

FAQs

Package last updated on 15 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc