Scan your entire website with Google Lighthouse.
npm install @unlighthouse/coreThe core engine of Unlighthouse that handles website scanning, Lighthouse execution, and report generation.
``ts
import { createUnlighthouse } from '@unlighthouse/core'
const unlighthouse = await createUnlighthouse({
site: 'https://example.com',
debug: true,
scanner: {
device: 'desktop',
}
})
await unlighthouse.start()
`
`ts
import { createUnlighthouse } from '@unlighthouse/core'
const unlighthouse = await createUnlighthouse(
{ / user config / },
{
name: 'custom',
routeDefinitions: () => generateRouteDefinitions(),
}
)
`
`ts
import { useUnlighthouse } from '@unlighthouse/core'
const { hooks } = useUnlighthouse()
hooks.hook('task-complete', (path, response) => {
console.log('Task completed for:', path)
})
`
- createUnlighthouse(userConfig, provider?) - Initialize UnlighthouseuseUnlighthouse()
- - Access the global Unlighthouse contextgenerateClient(options)` - Generate static client files
-
- API Reference
- Configuration Guide
- Puppeteer Configuration
MIT License © 2021-PRESENT Harlan Wilton