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>
35 lines
1.4 KiB
JSON
35 lines
1.4 KiB
JSON
{
|
|
"name": "chrnx-wordpress-theme",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"packageManager": "npm@11.17.0",
|
|
"engines": {
|
|
"node": ">=22 <27"
|
|
},
|
|
"scripts": {
|
|
"build": "wp-scripts build",
|
|
"start": "wp-scripts start",
|
|
"env:start": "wp-env start --update",
|
|
"env:stop": "wp-env stop",
|
|
"env:activate": "wp-env run cli wp theme activate chrnx",
|
|
"composer": "wp-env run cli --env-cwd=wp-content/themes/chrnx composer",
|
|
"phpcs": "npm run composer -- exec phpcs -- -q",
|
|
"test:smoke": "node --test tests/smoke/*.test.mjs",
|
|
"test:js": "wp-scripts test-unit-js --runInBand --modulePathIgnorePatterns='<rootDir>/.worktrees/'",
|
|
"test:php": "wp-env run tests-cli --env-cwd=wp-content/themes/chrnx -- composer exec phpunit --",
|
|
"test:e2e": "playwright test",
|
|
"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",
|
|
"package": "./scripts/package-theme.sh"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "1.62.1",
|
|
"@wordpress/env": "11.12.0",
|
|
"@wordpress/scripts": "34.0.0",
|
|
"axe-playwright": "2.2.2",
|
|
"lighthouse": "13.4.1"
|
|
}
|
|
}
|