Skip to content

Commit

Permalink
update assetgraph-builder to latest (#3594)
Browse files Browse the repository at this point in the history
* netlify-headers: Skip unloaded assets when extracting headers

* update assetgraph-builder to latest

* update svgo

* fix postbuild script

* screw it, we're going right to a 10s timeout

Signed-off-by: Christopher Hiller <[email protected]>
boneskull authored Dec 12, 2018
1 parent f187d6d commit 8750ef8
Showing 4 changed files with 852 additions and 351 deletions.
1,191 changes: 844 additions & 347 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-scripts.js
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ module.exports = {
integration: {
script: test(
'integration',
'--timeout 5000 --slow 1500 "test/integration/*.spec.js"'
'--timeout 10000 --slow 3750 "test/integration/*.spec.js"'
),
description: 'Run Node.js integration tests',
hiddenFromHelp: true
@@ -264,7 +264,7 @@ module.exports = {
},
postbuild: {
script:
'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/_headers',
'mkdirp docs/_dist && 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/_headers',
description: 'Post-process docs after build',
hiddenFromHelp: true
},
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -532,7 +532,7 @@
"rimraf": "^2.5.2",
"sinon": "^7.1.1",
"strip-ansi": "^5.0.0",
"svgo": "^0.7.2",
"svgo": "^1.1.1",
"through2": "^2.0.5",
"unexpected": "^10.39.2",
"unexpected-sinon": "^10.10.1",
6 changes: 5 additions & 1 deletion scripts/netlify-headers.js
Original file line number Diff line number Diff line change
@@ -29,7 +29,11 @@ new AssetGraph({root: 'docs/_dist'})
followRelations: {type: 'HtmlAnchor', crossorigin: false}
})
.queue(function(assetGraph) {
const assets = assetGraph.findAssets({type: 'Html', isInline: false});
const assets = assetGraph.findAssets({
type: 'Html',
isInline: false,
isLoaded: true
});

const headerMap = {};

0 comments on commit 8750ef8

Please sign in to comment.