chore: scaffold CHRNX theme tooling
This commit is contained in:
12 files changed
+29784
No files matched your search
@@ -0,0 +1,9 @@
|
||||
.superpowers/
|
||||
node_modules/
|
||||
vendor/
|
||||
dist/
|
||||
.wp-env.override.json
|
||||
test-results/
|
||||
playwright-report/
|
||||
.DS_Store
|
||||
tmp/imagegen/*.png
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
|
||||
"core": "https://wordpress.org/wordpress-6.9.6.zip",
|
||||
"phpVersion": "8.3",
|
||||
"autoPort": false,
|
||||
"port": 8888,
|
||||
"config": {
|
||||
"WP_DEBUG": true,
|
||||
"SCRIPT_DEBUG": true
|
||||
},
|
||||
"mappings": {
|
||||
"wp-content/themes/chrnx": "."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
# CHRNX WordPress Theme
|
||||
|
||||
Custom WordPress theme for chrnx.dev. This repository currently contains the
|
||||
approved design materials and a reproducible local development scaffold.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js 22 (use `nvm use`)
|
||||
- npm
|
||||
- Composer dependencies are installed inside the wp-env CLI container
|
||||
- Docker through Colima on macOS
|
||||
- Docker Compose v2 available as a Docker CLI plugin
|
||||
|
||||
## Local setup
|
||||
|
||||
```sh
|
||||
nvm use
|
||||
npm install
|
||||
npx playwright install chromium firefox webkit
|
||||
colima start
|
||||
PATH="/opt/homebrew/opt/docker/bin:$PATH" npm run env:start
|
||||
PATH="/opt/homebrew/opt/docker/bin:$PATH" npm run composer -- install
|
||||
```
|
||||
|
||||
The local WordPress site is available at <http://localhost:8888>. Once the
|
||||
theme implementation exists, activate it with `npm run env:activate`.
|
||||
|
||||
Run the configuration smoke test with:
|
||||
|
||||
```sh
|
||||
npm run test:smoke
|
||||
```
|
||||
|
||||
Use `npm run env:stop` to stop the local WordPress environment.
|
||||
|
||||
If Homebrew's Docker CLI cannot find an existing standalone Compose v2 binary,
|
||||
link it into Docker's per-user plugin directory before starting wp-env:
|
||||
|
||||
```sh
|
||||
mkdir -p "$HOME/.docker/cli-plugins"
|
||||
ln -s /usr/local/bin/docker-compose "$HOME/.docker/cli-plugins/docker-compose"
|
||||
```
|
||||
|
||||
## Deployment boundary
|
||||
|
||||
This setup is local-only. It does not create or configure a production
|
||||
deployment, publish the theme, or mutate chrnx.dev.
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "chrnx/wordpress-theme",
|
||||
"description": "Development tooling for the CHRNX WordPress theme.",
|
||||
"type": "wordpress-theme",
|
||||
"license": "proprietary",
|
||||
"require-dev": {
|
||||
"wp-coding-standards/wpcs": "^3.0",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+435
@@ -0,0 +1,435 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f790b3c56f2de5e94404c92a26155dbf",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
||||
"version": "v1.2.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/composer-installer.git",
|
||||
"reference": "963f0c67bffde0eac41b56be71ac0e8ba132f0bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/963f0c67bffde0eac41b56be71ac0e8ba132f0bd",
|
||||
"reference": "963f0c67bffde0eac41b56be71ac0e8ba132f0bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer-plugin-api": "^2.2",
|
||||
"php": ">=5.4",
|
||||
"squizlabs/php_codesniffer": "^3.1.0 || ^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/composer": "^2.2",
|
||||
"ext-json": "*",
|
||||
"ext-zip": "*",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0 || ^10.0.0@dev",
|
||||
"yoast/phpunit-polyfills": "^1.0"
|
||||
},
|
||||
"type": "composer-plugin",
|
||||
"extra": {
|
||||
"class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Franck Nijhof",
|
||||
"email": "opensource@frenck.dev",
|
||||
"homepage": "https://frenck.dev",
|
||||
"role": "Open source developer"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
||||
"keywords": [
|
||||
"PHPCodeSniffer",
|
||||
"PHP_CodeSniffer",
|
||||
"code quality",
|
||||
"codesniffer",
|
||||
"composer",
|
||||
"installer",
|
||||
"phpcbf",
|
||||
"phpcs",
|
||||
"plugin",
|
||||
"qa",
|
||||
"quality",
|
||||
"standard",
|
||||
"standards",
|
||||
"style guide",
|
||||
"stylecheck",
|
||||
"tests"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/composer-installer/issues",
|
||||
"security": "https://github.com/PHPCSStandards/composer-installer/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/composer-installer"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2026-05-06T08:26:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpcsstandards/phpcsextra",
|
||||
"version": "1.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
|
||||
"reference": "39467533fdb742446d68c1d10ac33d625ee0311c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/39467533fdb742446d68c1d10ac33d625ee0311c",
|
||||
"reference": "39467533fdb742446d68c1d10ac33d625ee0311c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"phpcsstandards/phpcsutils": "^1.2.3",
|
||||
"squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcsstandards/phpcsdevcs": "^1.2.0",
|
||||
"phpcsstandards/phpcsdevtools": "^1.2.1",
|
||||
"phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-stable": "1.x-dev",
|
||||
"dev-develop": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"homepage": "https://github.com/jrfnl",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A collection of sniffs and standards for use with PHP_CodeSniffer.",
|
||||
"keywords": [
|
||||
"PHP_CodeSniffer",
|
||||
"phpcbf",
|
||||
"phpcodesniffer-standard",
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHPCSExtra"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2026-07-27T11:13:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpcsstandards/phpcsutils",
|
||||
"version": "1.2.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
|
||||
"reference": "5f35d9408c54d7b529501f3c688b6eae562aea1f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/5f35d9408c54d7b529501f3c688b6eae562aea1f",
|
||||
"reference": "5f35d9408c54d7b529501f3c688b6eae562aea1f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
|
||||
"php": ">=5.4",
|
||||
"squizlabs/php_codesniffer": "^3.13.5 || ^4.0.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-filter": "*",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcsstandards/phpcsdevcs": "^1.2.0",
|
||||
"yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0 || ^3.0.0"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-stable": "1.x-dev",
|
||||
"dev-develop": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"PHPCSUtils/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"homepage": "https://github.com/jrfnl",
|
||||
"role": "lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A suite of utility functions for use with PHP_CodeSniffer",
|
||||
"homepage": "https://phpcsutils.com/",
|
||||
"keywords": [
|
||||
"PHP_CodeSniffer",
|
||||
"phpcbf",
|
||||
"phpcodesniffer-standard",
|
||||
"phpcs",
|
||||
"phpcs3",
|
||||
"phpcs4",
|
||||
"standards",
|
||||
"static analysis",
|
||||
"tokens",
|
||||
"utility"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://phpcsutils.com/",
|
||||
"issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHPCSUtils"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2026-07-27T10:28:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "3.13.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
|
||||
"reference": "4c378e1a528ea066890fc2397cbdd2f94eb2fc91"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/4c378e1a528ea066890fc2397cbdd2f94eb2fc91",
|
||||
"reference": "4c378e1a528ea066890fc2397cbdd2f94eb2fc91",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
|
||||
},
|
||||
"bin": [
|
||||
"bin/phpcbf",
|
||||
"bin/phpcs"
|
||||
],
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Greg Sherwood",
|
||||
"role": "Former lead"
|
||||
},
|
||||
{
|
||||
"name": "Juliette Reinders Folmer",
|
||||
"role": "Current lead"
|
||||
},
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
|
||||
"security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
|
||||
"source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
|
||||
"wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/PHPCSStandards",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/jrfnl",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "open_collective"
|
||||
},
|
||||
{
|
||||
"url": "https://thanks.dev/u/gh/phpcsstandards",
|
||||
"type": "thanks_dev"
|
||||
}
|
||||
],
|
||||
"time": "2026-08-06T00:17:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "wp-coding-standards/wpcs",
|
||||
"version": "3.4.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
|
||||
"reference": "ec2ff942335f33683a5957a85d138753876a05cf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/ec2ff942335f33683a5957a85d138753876a05cf",
|
||||
"reference": "ec2ff942335f33683a5957a85d138753876a05cf",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-filter": "*",
|
||||
"ext-libxml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlreader": "*",
|
||||
"php": ">=7.2",
|
||||
"phpcsstandards/phpcsextra": "^1.5.1",
|
||||
"phpcsstandards/phpcsutils": "^1.2.3",
|
||||
"squizlabs/php_codesniffer": "^3.13.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
||||
"phpcompatibility/php-compatibility": "^10.0.0@dev",
|
||||
"phpcsstandards/phpcsdevtools": "^1.2.0",
|
||||
"phpunit/phpunit": "^8.0 || ^9.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-iconv": "For improved results",
|
||||
"ext-mbstring": "For improved results"
|
||||
},
|
||||
"type": "phpcodesniffer-standard",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Contributors",
|
||||
"homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards",
|
||||
"static analysis",
|
||||
"wordpress"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
|
||||
"source": "https://github.com/WordPress/WordPress-Coding-Standards",
|
||||
"wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://opencollective.com/php_codesniffer",
|
||||
"type": "custom"
|
||||
}
|
||||
],
|
||||
"time": "2026-07-27T11:53:23+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
Generated
+29156
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "chrnx-wordpress-theme",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"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",
|
||||
"test:php": "wp-env run cli --env-cwd=wp-content/themes/chrnx phpunit -- --configuration=phpunit.xml.dist",
|
||||
"test:e2e": "playwright test",
|
||||
"lint:js": "wp-scripts lint-js assets/js tests/js scripts",
|
||||
"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"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="CHRNX WordPress Theme">
|
||||
<description>Coding standards for the CHRNX WordPress theme.</description>
|
||||
|
||||
<file>.</file>
|
||||
<arg name="extensions" value="php"/>
|
||||
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
||||
<exclude-pattern>*/vendor/*</exclude-pattern>
|
||||
|
||||
<rule ref="WordPress-Core"/>
|
||||
<rule ref="WordPress-Extra"/>
|
||||
|
||||
<rule ref="WordPress.WP.I18n">
|
||||
<properties>
|
||||
<property name="text_domain" type="array" value="chrnx"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
||||
<properties>
|
||||
<property name="prefixes" type="array" value="chrnx_"/>
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit colors="true" failOnWarning="true" failOnRisky="true">
|
||||
<testsuites>
|
||||
<testsuite name="CHRNX theme tests">
|
||||
<directory suffix="Test.php">tests/php</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
@@ -0,0 +1,27 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests/e2e',
|
||||
fullyParallel: true,
|
||||
forbidOnly: Boolean(process.env.CI),
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
reporter: 'html',
|
||||
use: {
|
||||
baseURL: 'http://localhost:8888',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
},
|
||||
{
|
||||
name: 'firefox',
|
||||
use: { ...devices['Desktop Firefox'] },
|
||||
},
|
||||
{
|
||||
name: 'webkit',
|
||||
use: { ...devices['Desktop Safari'] },
|
||||
},
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import test from 'node:test';
|
||||
|
||||
test('tooling is pinned and wp-env maps this repo as chrnx', async () => {
|
||||
const pkg = JSON.parse(await readFile('package.json', 'utf8'));
|
||||
const env = JSON.parse(await readFile('.wp-env.json', 'utf8'));
|
||||
|
||||
assert.equal(pkg.devDependencies['@wordpress/env'], '11.12.0');
|
||||
assert.equal(pkg.devDependencies['@wordpress/scripts'], '34.0.0');
|
||||
assert.equal(pkg.devDependencies['@playwright/test'], '1.62.1');
|
||||
assert.equal(pkg.devDependencies.lighthouse, '13.4.1');
|
||||
assert.equal(env.core, 'https://wordpress.org/wordpress-6.9.6.zip');
|
||||
assert.equal(env.phpVersion, '8.3');
|
||||
assert.equal(env.mappings['wp-content/themes/chrnx'], '.');
|
||||
});
|
||||
Reference in new issue
Block a user