Skip to content

Commit f5a1dfd

Browse files
Merge pull request #84 from WebDevStudios/feature/WDSEN-5-Script-Cleanup
WDSEN-51: Script cleanup + platform agnostic package changes
2 parents cdabb9d + 0ad08aa commit f5a1dfd

29 files changed

Lines changed: 3721 additions & 8127 deletions

.devcontainer/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Theme Dev Container
2+
3+
A **theme-only** dev container so you can work on WDS BT without installing PHP or Node locally—whether you’re at WDS (using the project template) or anywhere else. The stack matches [WebDevStudios/wds-devcontainer](https://github.com/WebDevStudios/wds-devcontainer): **PHP 8.2** and **Node 24**.
4+
5+
## Usage
6+
7+
1. Open this theme repo in Cursor or VS Code.
8+
2. Choose **Reopen in Container** (or run **Dev Containers: Reopen in Container** from the command palette).
9+
3. After the container builds, run `npm run setup` if needed (postCreate runs `npm ci && composer install`).
10+
11+
## What’s included
12+
13+
- PHP 8.2 with Composer and extensions: tokenizer, xmlwriter, simplexml, dom, mbstring
14+
- Node 24
15+
- VS Code extensions: Intelephense, ESLint, Prettier, Stylelint
16+
17+
When you use a full WordPress project (e.g. WDS project template), that project’s devcontainer is used for the site; this one is for standalone theme development only.

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "WDS BT",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-24.04",
4+
"features": {
5+
"ghcr.io/devcontainers/features/php:1": {
6+
"version": "8.2",
7+
"installComposer": true,
8+
"installXdebug": false,
9+
"extensions": "tokenizer,xmlwriter,simplexml,dom,mbstring"
10+
},
11+
"ghcr.io/devcontainers/features/node:1": {
12+
"version": "24",
13+
"nodeGypDependencies": true,
14+
"installYarnUsingApt": false
15+
}
16+
},
17+
"customizations": {
18+
"vscode": {
19+
"extensions": [
20+
"bmewburn.vscode-intelephense-client",
21+
"dbaeumer.vscode-eslint",
22+
"esbenp.prettier-vscode",
23+
"stylelint.vscode-stylelint"
24+
]
25+
}
26+
},
27+
"postCreateCommand": "npm ci && composer install --no-interaction",
28+
"remoteUser": "vscode"
29+
}

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# The version of your theme, manually updated by you.
22
# This version will be reflected in style.css, package.json, and composer.json.
3-
VERSION=1.4.0
3+
VERSION=1.4.5

.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Allow legacy peer deps for WordPress ecosystem compatibility
2+
legacy-peer-deps=true
3+
4+
# Ensure scripts run with proper shell
5+
script-shell=/bin/bash

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WDS BT
22

3-
## Version: 1.4.0
3+
## Version: 1.4.5
44

55
[![WebDevStudios. Your Success is Our Mission.](https://webdevstudios.com/wp-content/uploads/2024/02/wds-banner.png)](https://webdevstudios.com/contact/)
66

@@ -53,7 +53,7 @@ WDS BT is a foundational WordPress block theme designed for maximum flexibility
5353
| Responsive Design | Ensures optimal display and functionality across devices. |
5454
| Foundation Theme | Flexible base theme optimized for extensive customization. |
5555
| Automated Code Quality | Modern linting configurations with PHP 8.3 compatibility, ESLint 9 flat config, WordPress coding standards, and automated quality checks. |
56-
| Cross-Platform PHP Support | Automatic PHP binary detection and extension handling for Mac, Linux, and CI/CD environments. |
56+
| DevContainer | [.devcontainer](.devcontainer) for **theme-only** workflow: PHP 8.2, Node 24, Composer. Usable by anyone (not just WDS); matches [wds-devcontainer](https://github.com/WebDevStudios/wds-devcontainer) when using the project template. |
5757
| Third-party Block Style Overrides | Conditionally enqueue and override third-party block styles for efficient asset delivery. |
5858
| Accessibility Compliance | Built-in WCAG 2.2 compliance with automated Pa11y checks. |
5959
| Enhanced Webpack Configuration | Refined Webpack setup for improved dependency resolution and optimized asset management. |
@@ -82,6 +82,8 @@ WDS BT is a foundational WordPress block theme designed for maximum flexibility
8282
2. Activate WDS BT from your WordPress admin panel under Appearance > Themes.
8383
3. Run `npm run setup` to install dependencies and perform an initial build.
8484

85+
**Theme-only dev (no local PHP/Node):** Open this repo in Cursor or VS Code and choose **Reopen in Container**. The [.devcontainer](.devcontainer) provides PHP 8.2 and Node 24 so you can run `npm run setup` and build without installing tooling locally—works for everyone, not only WDS projects.
86+
8587
## Documentation
8688

8789
Full documentation is in the **[docs/](docs/README.md)** folder. Use it for setup details, NPM scripts, fonts, version management, linting and Lefthook, performance and images, Block Showcase, customizations, and accessibility/quality.

assets/scss/templates/block-showcase.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
margin-top: var(--wp--preset--spacing--gap);
2727

2828
.wp-block-accordion {
29-
background: var(--wp--preset--color--base, #fff);
3029
overflow: hidden;
3130
}
3231

@@ -97,7 +96,6 @@
9796
var(--wp--preset--color--contrast, rgba(0, 0, 0, 0.1));
9897
border-radius: var(--wp--preset--border-radius--md);
9998
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
100-
background: var(--wp--preset--color--base, #fff);
10199
padding: var(--wp--preset--spacing--50);
102100
overflow: hidden;
103101
display: flex;
@@ -120,7 +118,6 @@
120118
rgba(0, 0, 0, 0.6)
121119
);
122120
font-size: var(--wp--preset--font-size--small);
123-
background: var(--wp--preset--color--base-2, #f5f5f5);
124121
padding: var(--wp--preset--spacing--30);
125122
border-radius: var(--wp--preset--border-radius--sm);
126123
}

0 commit comments

Comments
 (0)