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:
2 files changed
+89
-1
No files matched your search
+2
-1
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user