Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port lighthouse-docker to TS in New Repo #1

Merged
merged 15 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DD_API_KEY=
DD_APP_KEY=
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ node_modules/

# VSCode Misc.
.vscode

# Config Files
urls.json
metrics-config.json

# TSC Output
dist
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# vigilo
# Vigilo
🚧 Still in development 🚧

Vigilo is a monitoring tool that automates Lighthouse audits and sends key metrics to Datadog. Designed to keep a vigilant eye on your web application's performance and accessibility.

### Setup
1. Clone the repo
2. Run `pnpm install`
3. Run `pnpm run build`
4. Run `cp .env.example .env`
5. Add your Datadog API key and Datadog Application key to the `.env` file
6. Run `cp urls.example.json urls.json`
7. Add your URLs to the `urls.json` file
8. Run `cp metrics.example.json metrics.json`
9. Add the metrics you want to send to Datadog to the `metrics.json` file

### Usage
1. After setup, run `pnpm start` to run vigilo and send metrics to Datadog
13 changes: 13 additions & 0 deletions metrics-config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"audits": [
"largest-contentful-paint",
"first-contentful-paint",
"cumulative-layout-shift",
"total-blocking-time",
"speed-index",
"total-byte-weight",
"server-response-time",
"is-crawlable",
"screenshot-thumbnails"
]
}
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"type": "module",
"scripts": {
"start": "node dist/index.js",
"build": "tsc",
"clean": "rm -rf dist",
"build": "pnpm clean && tsc",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
Expand All @@ -17,5 +18,11 @@
"@tsconfig/node18": "^18.2.1",
"@types/node": "^20.5.9",
"typescript": "^5.2.2"
},
"dependencies": {
"@datadog/datadog-api-client": "^1.16.0",
"chrome-launcher": "^1.0.0",
"dotenv": "^16.3.1",
"lighthouse": "^11.1.0"
}
}
Loading