Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
squash! Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchabran authored and actions-user committed Jun 20, 2024
1 parent 48b41eb commit 74a0373
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/scripts/generate-redirects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import fs from 'fs/promises'

import redirects from './redirects.mjs'

const redirectLines = (await redirects()).map((entry) => `${entry.source} ${entry.destination}${entry.force ? ' 301!' : ''}`).join('\n')
const redirectLines = (await redirects())
.map(entry => `${entry.source} ${entry.destination}${entry.force ? ' 301!' : ''}`)
.join('\n')
const lines = `\n# Generated by generate-redirects.mjs from Git history\n${redirectLines}\n`

console.log('Redirects:\n', lines)
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/redirects.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function readNotionMigrationRedirects() {
// To go around that, we add a new field 'force' that the script that
// generate the final _redirects file used by Netlify uses to append
// 301! on that entry, effectively forcing the redirection.
for ( const entry of data.redirections ) {
for (const entry of data.redirections) {
entry.force = true
}
return data
Expand Down

0 comments on commit 74a0373

Please sign in to comment.