diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e25b825a1..ca376c673 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -144,6 +144,8 @@ You'll need to update these every now and then when you change something in the yarn run critical ``` +You can temporarily disable critical path optimizations by loading it with `?nocrit=1`, eg, `https://devhints.io/?nocrit=1`. + ## Critical path JS There's JavaScript that's included inline in every page. It's entrypoint is: diff --git a/package.json b/package.json index 8d787198b..d865510e0 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,9 @@ "critical": "node _support/critical.js", "dev": "run-p dev:webpack dev:jekyll", "dev:webpack": "webpack --watch --colors -p", - "dev:jekyll": "bundle exec jekyll serve --safe --drafts --watch --port $PORT --incremental", + "dev:jekyll": "if [ -f _site ]; then run-s dev:jekyll:incremental; else run-s dev:jekyll:initial; fi", + "dev:jekyll:initial": "bundle exec jekyll serve --safe --drafts --watch --port $PORT --incremental", + "dev:jekyll:incremental": "bundle exec jekyll serve --skip-initial-build --safe --drafts --watch --port $PORT --incremental", "test": "jest", "test:all": "run-s test lint", "lint": "standard -v",