build: package the theme as an installable zip

An allowlist so a new dev file is excluded by default, a version check
against style.css, and a refusal to ship tests, scripts or vendor.

The first package was 34MB because every img fallback pointed at the
design master: a browser without AVIF or WebP downloaded 3.4MB per
image. That was a live cost, not just a packaging one. Fallbacks point
at the generated WebP now and masters stay out of the zip, which is 3MB.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:41:48 -05:00
1 parent f859780eaa
commit 842c8a9b37
2 files changed
+89 -1

No files matched your search

+2 -1
View File
@@ -21,7 +21,8 @@
"lint:js": "wp-scripts lint-js assets/js tests/js tests/e2e",
"lint:css": "wp-scripts lint-style 'assets/css/**/*.css' 'blocks/**/*.css'",
"lint:md": "wp-scripts lint-md-docs docs README.md",
"test": "npm run test:smoke && npm run lint:js && npm run lint:css && npm run phpcs && npm run test:js && npm run test:php && npm run test:e2e"
"test": "npm run test:smoke && npm run lint:js && npm run lint:css && npm run phpcs && npm run test:js && npm run test:php && npm run test:e2e",
"package": "./scripts/package-theme.sh"
},
"devDependencies": {
"@playwright/test": "1.62.1",