Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
25 changes: 9 additions & 16 deletions src/runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ interface LocalRunnerOptions {
pathToCache: string;
}

const existingSectionsUrls = [
'/uk/docs/web/javascript/',
'/uk/docs/web/html/',
'/uk/docs/web/css/',
'/uk/docs/web/svg/',
'/uk/docs/web/guide/',
'/uk/docs/glossary/',
];
// const existingSectionsUrls = [
// '/uk/docs/web/javascript/',
// '/uk/docs/web/html/',
// '/uk/docs/web/css/',
// '/uk/docs/web/svg/',
// '/uk/docs/web/guide/',
// '/uk/docs/glossary/',
// ];

export type RunnerOptions = RegistryInitOptions & LocalRunnerOptions;

Expand Down Expand Up @@ -141,14 +141,7 @@ export default class Runner {
);
}

const urlsInScope: Array<[string, number]> = Object.entries(
countsByPage,
).filter(([url]) => {
const normalizedUrl = url.toLowerCase();
return existingSectionsUrls.some((urlPrefix) =>
normalizedUrl.includes(urlPrefix),
);
});
const urlsInScope: Array<[string, number]> = Object.entries(countsByPage);

if (urlsInScope.length) {
urlsInScope.sort(([_a, countA], [_b, countB]) => countB - countA);
Expand Down
Loading