Skip to content

Commit 51502ab

Browse files
chore: fix header generation and production build crashes (mochajs#5100)
* chore: use direct path to assetgraph-builder > buildProduction in nps * chore: switch NODE_VERSION to 20 * chore: remove scripts/netlify-headers.js * chore: remove scripts/netlify-headers.js * git checkout master -- netlify.toml
1 parent 7f6f040 commit 51502ab

File tree

2 files changed

+2
-128
lines changed

2 files changed

+2
-128
lines changed

package-scripts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ module.exports = {
259259
docs: {
260260
default: {
261261
script:
262-
'nps docs.clean && nps docs.api && eleventy && nps docs.linkcheck && node scripts/netlify-headers.js docs/_site >> docs/_site/_headers',
262+
'nps docs.clean && nps docs.api && eleventy && nps docs.linkcheck',
263263
description: 'Build documentation'
264264
},
265265
production: {
@@ -277,7 +277,7 @@ module.exports = {
277277
},
278278
postbuild: {
279279
script:
280-
'buildProduction docs/_site/index.html --outroot docs/_dist --canonicalroot https://mochajs.org/ --optimizeimages --svgo --inlinehtmlimage 9400 --inlinehtmlscript 0 --asyncscripts && cp docs/_headers docs/_dist/_headers && node scripts/netlify-headers.js docs/_dist >> docs/_dist/_headers',
280+
'node node_modules/assetgraph-builder/bin/buildProduction docs/_site/index.html --outroot docs/_dist --canonicalroot https://mochajs.org/ --optimizeimages --svgo --inlinehtmlimage 9400 --inlinehtmlscript 0 --asyncscripts && cp docs/_headers docs/_dist/_headers',
281281
description: 'Post-process docs after build',
282282
hiddenFromHelp: true
283283
},

scripts/netlify-headers.js

-126
This file was deleted.

0 commit comments

Comments
 (0)