mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-10-22 21:25:27 +00:00
Remove eslint/prettier and switch to biome (#2880)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import psi from 'psi';
|
||||
|
||||
import { getContentTestURL, getTargetURL } from './utils';
|
||||
import { getContentTestURL } from './utils';
|
||||
|
||||
interface Test {
|
||||
url: string;
|
||||
@@ -24,17 +24,11 @@ const tests: Array<Test> = [
|
||||
},
|
||||
];
|
||||
|
||||
console.log(`Starting PageSpeed testing with ${getTargetURL()}...`);
|
||||
|
||||
for (const test of tests) {
|
||||
const url = getContentTestURL(test.url);
|
||||
|
||||
console.log(`Testing ${url} on ${test.strategy}...`);
|
||||
await psi.output(url, {
|
||||
strategy: test.strategy,
|
||||
threshold: test.threshold,
|
||||
key: process.env.PAGESPEED_API_KEY,
|
||||
});
|
||||
|
||||
console.log('');
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
export function getTargetURL() {
|
||||
const targetUrl = Bun.argv[2];
|
||||
if (!targetUrl) {
|
||||
console.error('No target URL provided');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user