Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Oct 9, 2023
1 parent 6e405ac commit 54fb9d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/purge-orphaned-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const option = (name) => process.argv.includes(`--${name}`)

const dryRun = option(`dry-run`)
const quiet = option(`quiet`)
const manifestPath = argument(`manifest`, () => option('ssr') ? `./bootstrap/ssr/ssr-manifest.json` : `./public/build/manifest.json`)
const wantsSsr = option('ssr')
const manifestPath = argument(`manifest`, () => wantsSsr ? `./bootstrap/ssr/ssr-manifest.json` : `./public/build/manifest.json`)
const assetsDirectory = argument(`assets`, () => `${dirname(manifestPath)}/assets`)

/*
Expand All @@ -45,7 +46,7 @@ const main = () => {

const isSsr = Array.isArray(manifest[manifestKeys[0]])

if (option('ssr') && ! isSsr) {
if (wantsSsr && ! isSsr) {
write('Did not find an SSR manifest.')

process.exit(1)
Expand Down

0 comments on commit 54fb9d7

Please sign in to comment.