Skip to content

Commit

Permalink
generator: simplify arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
paroxp committed Aug 29, 2023
1 parent 28f0ca5 commit fe2fcfe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ async function generator(): Promise<void> {
];
console.info(`${pages.length} pages to iterate.`);

pages.map(page => {
const { path } = page;
writeFileSync(distDir(page.file), render(config, page.body, { path }));
console.info(`'${page.file}' page generated.`);
pages.map(({ body, file, path }) => {
writeFileSync(distDir(file), render(config, body, { path }));
console.info(`'${file}' page generated.`);
});

const sitemap = await generateSiteMap(config, pages);
Expand Down

0 comments on commit fe2fcfe

Please sign in to comment.