Add asset fingerprinting, build/dev scripts

Add fingerprinting for the CSS file, as well as npm scripts for all
common build and dev tasks.
This commit is contained in:
2022-06-04 11:09:00 +02:00
parent f0f7bfd190
commit 5a9ffaab62
15 changed files with 1686 additions and 723 deletions

View File

@@ -4,8 +4,15 @@
"private": true,
"description": "The website on kosmos.org",
"scripts": {
"build:css": "",
"dev": "tailwindcss -i ./themes/kosmos-22/source/main.css -o ./themes/kosmos-22/static/css/main.css --watch"
"clean": "rm -rf public/*",
"build:css": "tailwindcss -i ./themes/kosmos-22/source/main.css -o ./themes/kosmos-22/assets/css/main.css",
"build:site": "hugo",
"build:release": "npm-run-all clean prod:css prod:site",
"prod:css": "npm run build:css -- --minify",
"prod:site": "hugo --gc --minify",
"dev": "npm-run-all --parallel dev:*",
"dev:css": "npm run build:css -- --watch",
"dev:site": "hugo server --disableFastRender"
},
"repository": {
"type": "git",