jekyll: don't rebuild unless necessary

This commit is contained in:
Rico Sta. Cruz 2017-10-20 18:14:52 +08:00
parent f8af762ea3
commit 544ad25199
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
2 changed files with 5 additions and 1 deletions

View File

@ -144,6 +144,8 @@ You'll need to update these every now and then when you change something in the
yarn run critical 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 ## Critical path JS
There's JavaScript that's included inline in every page. It's entrypoint is: There's JavaScript that's included inline in every page. It's entrypoint is:

View File

@ -26,7 +26,9 @@
"critical": "node _support/critical.js", "critical": "node _support/critical.js",
"dev": "run-p dev:webpack dev:jekyll", "dev": "run-p dev:webpack dev:jekyll",
"dev:webpack": "webpack --watch --colors -p", "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": "jest",
"test:all": "run-s test lint", "test:all": "run-s test lint",
"lint": "standard -v", "lint": "standard -v",