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

feat: introduce all assessments command #4

Merged
merged 2 commits into from Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
@@ -1,2 +1,7 @@
# aem-seo-research
Misc SEO research

## How to trigger all assessments

`npm run all <baselUrl>`

7 changes: 7 additions & 0 deletions all-assessments.js
@@ -0,0 +1,7 @@
import {canonical} from "./assessment/canonical.js";
import {sitemap} from "./assessment/sitemap.js";

(async () => {
await sitemap;
await canonical;
})();
2 changes: 1 addition & 1 deletion assessment/canonical.js
Expand Up @@ -71,7 +71,7 @@ const canonicalAudit = async (siteUrl, assessment) => {
}));
};

(async () => {
export const canonical = (async () => {
const assessment = await createAssessment(userSiteUrl, 'Canonical');
assessment.setRowHeadersAndDefaults({
url: '',
Expand Down
2 changes: 1 addition & 1 deletion assessment/sitemap.js
Expand Up @@ -125,7 +125,7 @@ export async function fetchSitemapsFromBaseUrl(url) {
return sitemaps;
};

(async () => {
export const sitemap = (async () => {
const assessment = await createAssessment(userSiteUrl, 'Sitemap');
assessment.setRowHeadersAndDefaults({
sitemapOrPage: '',
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -6,6 +6,7 @@
"type": "module",
"scripts": {
"test": "npm run test",
"all": "node all-assessments.js",
"lint": "eslint ."
},
"repository": {
Expand Down