Skip to content

Instantly share code, notes, and snippets.

View joviano-dias's full-sized avatar

Joviano Dias joviano-dias

  • Big Blue Wave Limited
  • London
View GitHub Profile
@joviano-dias
joviano-dias / Lighthouse-Puppeteer.js
Last active November 20, 2020 17:30
Run a lighthouse scan using puppeteer
const chromeLauncher = require('chrome-launcher');
const puppeteer = require('puppeteer');
const lighthouse = require('lighthouse');
const config = require('lighthouse/lighthouse-core/config/lr-desktop-config.js');
const reportGenerator = require('lighthouse/lighthouse-core/report/report-generator');
const request = require('request');
const util = require('util');
const fs = require('fs');
(async() => {
const chromeLauncher = require('chrome-launcher');
const puppeteer = require('puppeteer');
const lighthouse = require('lighthouse');
const config = require('lighthouse/lighthouse-core/config/lr-desktop-config.js');
const reportGenerator = require('lighthouse/lighthouse-core/report/report-generator');
const request = require('request');
const util = require('util');
const fs = require('fs');
const sleep = seconds =>
new Promise(resolve => setTimeout(resolve, (seconds || 1) * 1000));
@joviano-dias
joviano-dias / json-to-html-table.js
Last active November 11, 2023 02:47
Create HTML table from JSON using node-json2html
const json2html = require('node-json2html');
const fs = require('fs-extra')
let template_table_header = {
"<>": "tr", "html": [
{"<>": "th", "html": "App Name"},
{"<>": "th", "html": "Accessibility"},
{"<>": "th", "html": "Best Practices"},
{"<>": "th", "html": "SEO"},
{"<>": "th", "html": "Performance"}