Delightfully scan your entire website with Google Lighthouse. Navigate your performance, accessibility and SEO.
npm install unlighthouseThe main package for Unlighthouse - scan your entire website with Google Lighthouse. This is a convenience package that includes the core functionality and CLI tools.
``bashScan your website instantly
npx unlighthouse --site https://example.com
What's Included
This package includes:
-
@unlighthouse/core - Core scanning engine
- @unlighthouse/cli - Command-line interface
- @unlighthouse/client - Web interface for results
- Two binaries: unlighthouse and unlighthouse-ciInstallation
`bash
Global installation
npm install -g unlighthouseProject dependency
npm install unlighthouse --save-dev
`Usage
$3
`bash
Basic scan
unlighthouse --site https://example.comWith debugging and custom device
unlighthouse --site https://example.com --debug --desktopCustom configuration
unlighthouse --config-file unlighthouse.config.ts
`$3
`ts
import { createUnlighthouse } from 'unlighthouse'const unlighthouse = await createUnlighthouse({
site: 'https://example.com',
debug: true
})
await unlighthouse.start()
`$3
`bash
Enforce performance budgets in CI
unlighthouse-ci --site https://example.com --budget 85
`Configuration
Create
unlighthouse.config.ts:`ts
import { defineUnlighthouseConfig } from 'unlighthouse/config'export default defineUnlighthouseConfig({
site: 'https://example.com',
scanner: {
device: 'desktop',
throttle: false,
},
lighthouseOptions: {
onlyCategories: ['performance', 'accessibility'],
}
})
``- Getting Started Guide
- CLI Integration
- CI Integration
- API Reference
- Configuration Reference
MIT License © 2021-PRESENT Harlan Wilton