Skip to content

Commit f1d8c26

Browse files
committed
chore: IGNORE_MISSING_FILES
1 parent c7e5934 commit f1d8c26

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"unified": "9.2.2"
2626
},
2727
"devDependencies": {
28-
"@types/node": "20.16.11",
28+
"@types/node": "20.17.10",
2929
"eslint": "8.57.1",
3030
"eslint-config-standard": "17.1.0",
3131
"eslint-plugin-import": "2.31.0",

src/markdown-combine.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ const combineMarkdowns = ({ contents, pathToStatic, mainMdFilename }) => async l
2828
return { content, name: filename }
2929
}
3030

31-
throw new Error(`file ${filename} is not exist, but listed in ${contents}`)
31+
if (process.env.IGNORE_MISSING_FILES === 'true') {
32+
logger.warn(`file ${filename} does not exist, but listed in ${contents}`)
33+
return { content: '', name: filename }
34+
} else {
35+
throw new Error(`file ${filename} does not exist, but listed in ${contents}`)
36+
}
3237
})
3338
)
3439

0 commit comments

Comments
 (0)