for print lighthouse report in web service. (example : Remote Meeting)
-
install dependencies
npm install
oryarn
-
set
.env
file in root
NODE_ENV=development
TARGET_URL=https://www.remotemeeting.com # set your target url
ID=<write your Remote Meeting ID>
PW=<write your Remote Meeting Password>
-
just run yarn report
-
check out
./reports
folder :)
-
install dependencies
npm install
oryarn
-
set
.env
file in root
NODE_ENV=development
TARGET_URL=https://www.remotemeeting.com # set your target url
ID=<write your Remote Meeting ID>
PW=<write your Remote Meeting Password>
MY_SLACK_WEBHOOK_URL=<write your Slack Webhook URL>
-
just run yarn slack
-
customize my code
...
if (slackArray.length) {
slack.alert({
channel: "lighthouse",
attachments: [
{
author_name: "Lighthouse Cat",
author_icon:
"https://stickershop.line-scdn.net/stickershop/v1/product/1469342/LINEStorePC/main.png;compress=true",
thumb_url:
"https://stickershop.line-scdn.net/stickershop/v1/product/1469342/LINEStorePC/main.png;compress=true",
pretext: `${SlackHeadline}`,
fallback: "Nothing to show here",
color: "#ffdb8e",
fields: slackArray,
footer: `Lighthouse Tests | ${reportName}`,
footer_icon:
"https://platform.slack-edge.com/img/default_application_icon.png",
},
],
});
...
- check out
./reports
folder and slack channel :)