Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
fa1c1cc
refactor: add PSR4 support
bhavz-10 Mar 31, 2026
78caffb
feat: add sniffs for PSR4 conventions
bhavz-10 Mar 31, 2026
02a5eee
refactor: remove wp filename and class name snifss
bhavz-10 Mar 31, 2026
14d97a8
feat: add dir tree for each path
bhavz-10 Mar 31, 2026
113b382
fix: remove extra line breaks
bhavz-10 Mar 31, 2026
37adaa6
fix: remove wp InvalidClassFileName & NotHyphenatedLowercase sniffs
bhavz-10 Mar 31, 2026
eac8b32
refactor: add asset loader and refactor files
bhavz-10 Mar 31, 2026
0e239f1
fix: update doc blocks and trait check
bhavz-10 Mar 31, 2026
68445eb
fix: resolve copilot reviews
bhavz-10 Apr 1, 2026
28a011d
fix: update comment
bhavz-10 Apr 1, 2026
b3278b9
refact: Remove the plugin references from the theme
aryanjasala Apr 2, 2026
2161e07
refact: Remove non-required check
aryanjasala Apr 2, 2026
e3521f8
Merge pull request #645 from rtCamp/refactor/add-psr4-support-2
aryanjasala Apr 2, 2026
8726699
feat: fix phpcs, package name and strict typing
bhavz-10 Apr 2, 2026
eb0e482
feat: add @since tags
bhavz-10 Apr 2, 2026
0cae641
fix: update spacing
bhavz-10 Apr 2, 2026
8e92d02
fix: resolve strict type variable issues
bhavz-10 Apr 2, 2026
9dc6a43
fix: address feedback
bhavz-10 Apr 3, 2026
f01955a
fix: update the return type message
bhavz-10 Apr 3, 2026
b77068d
feat: remove @return void in function comment
bhavz-10 Apr 3, 2026
97bedf3
fix: remove additional trailing space
bhavz-10 Apr 4, 2026
4212bb4
fix: use [] consistently and remove bool from file type
bhavz-10 Apr 6, 2026
0a65a33
Merge pull request #659 from rtCamp/refactor/issue-657-compatibility-…
aryanjasala Apr 6, 2026
13caa31
GH-641: Fix Known CI Issues (#658)
Infinite-Null Apr 7, 2026
b1e6215
feat: add phpstan and resolve issues
bhavz-10 Apr 15, 2026
7b30859
refactor: move frontend source from assets/src/ to top-level src/
deepaklalwani97 Apr 17, 2026
62fd3d6
fix: add markdown files to stylelintignore
deepaklalwani97 Apr 17, 2026
35f27e0
fix: cast filemtime return value to string in get_file_version method
deepaklalwani97 Apr 17, 2026
d851294
refactor: reorganize asset paths and update webpack configuration
deepaklalwani97 Apr 17, 2026
65d57f4
fix: composer related issues
bhavz-10 Apr 22, 2026
cfddf41
fix: resolve phpcs issues
bhavz-10 Apr 22, 2026
0b56932
fix: update docblock to correct values
bhavz-10 Apr 23, 2026
6b33091
feat: add bootstrap file to phpstan for defining constants
bhavz-10 Apr 23, 2026
9cb04aa
feat: add @package tag and description
bhavz-10 Apr 23, 2026
98cc596
feat: add empty baseline
bhavz-10 Apr 23, 2026
cab57d3
feat: resolve phpcs issues
bhavz-10 Apr 23, 2026
986aa71
fix: use array<string, mixed> instead
bhavz-10 Apr 24, 2026
9e5c17f
Make readAllFileEntries recursive
abhishekxix Apr 27, 2026
01ca73e
Fix svg optimizer filter
abhishekxix Apr 27, 2026
1a47812
Update get_asset_meta to work with the new nested build paths
abhishekxix Apr 27, 2026
50374ec
feat: address issue with the analyseAndScan and scanFiles
bhavz-10 May 7, 2026
5186ec4
fix: resolve review feedback for frontend source reorganization
Adi-ty May 12, 2026
933429f
fix: replace short ternary with explicit ternary in get_asset_meta
Adi-ty May 12, 2026
e8282a6
fix: remove wordpress-stubs.php vendor
bhavz-10 May 12, 2026
8b97774
refact: Consistent spacing/tab usage
aryanjasala May 13, 2026
970ed56
chore: add regex101 reference comment
Adi-ty May 13, 2026
41b6c59
fix: PHPCS comment formatting
Adi-ty May 13, 2026
10a1af6
chore: add BrowserSync and dotenv deps
Swanand01 May 13, 2026
bee5ac9
feat: add live reload via BrowserSync
Swanand01 May 13, 2026
a41a661
feat: enqueue BrowserSync client in local environment
Swanand01 May 13, 2026
d8b6e5a
docs: add hmr.md
Swanand01 May 13, 2026
723174d
feat: update BrowserSync script enqueue to use null version
Swanand01 May 13, 2026
b7d5b06
Merge pull request #666 from rtCamp/feature/issue-634-add-phpstan
aryanjasala May 13, 2026
6cdbcbe
chore: remove redundant path from lint command
aryanjasala May 13, 2026
dbd0852
Update package.json
aryanjasala May 13, 2026
1a6c24b
Merge branch 'theme-elementary-v2' into refactor/frontend-source-reor…
aryanjasala May 13, 2026
f8888ef
Merge pull request #668 from rtCamp/refactor/frontend-source-reorgani…
aryanjasala May 13, 2026
6306591
chore: update devDependencies for Tailwind CSS and PostCSS support
Swanand01 May 14, 2026
6a0c0e9
feat: add PostCSS configuration for Tailwind CSS support
Swanand01 May 14, 2026
fea00c9
feat: enable Tailwind CSS support by adding configuration and styles
Swanand01 May 14, 2026
0234ec6
feat: add watch options to Webpack configuration
Swanand01 May 14, 2026
051b4ca
feat: add Tailwind CSS integration details to the development guide
Swanand01 May 14, 2026
b76ec0a
feat: modify start script, remove dev
Swanand01 May 14, 2026
bff802c
feat: add THEME_ELEMENTARY_DISABLE_BROWSER_SYNC and BS_PORT support
Swanand01 May 15, 2026
91b954c
feat: add BrowserSync port configuration to .env.local.example and docs
Swanand01 May 15, 2026
6161512
fix: typo
Swanand01 May 15, 2026
3820ee2
Merge branch 'theme-elementary-v2' into feat/hot-reload
Swanand01 May 15, 2026
24090e9
feat: enable HMR for blocks in start script and update webpack config…
Swanand01 May 18, 2026
f4e0f14
chore: update docs
Swanand01 May 18, 2026
2da575d
feat: update BrowserSync script handle to include theme version
Swanand01 May 18, 2026
3ba0cb9
feat: add filter and constant
Swanand01 May 18, 2026
b1e90da
feat: remove autoprefixer dependency from package.json
Swanand01 May 18, 2026
24fd0e5
format: tailwind.css
Swanand01 May 18, 2026
3ddb7fd
feat: remove autoprefixer from package-lock.json
Swanand01 May 18, 2026
89a9fb7
chore: add comment in webpack config
Swanand01 May 18, 2026
c32d013
fix: update constant name for Tailwind CSS support
Swanand01 May 18, 2026
5ae74f5
chore: format
Swanand01 May 18, 2026
a5bbd7d
refactor: rename constants
Swanand01 May 18, 2026
2d79a32
fix: rtl css path and css reload
Swanand01 May 19, 2026
9f90bd0
chore: add comments to webpack
Swanand01 May 19, 2026
c166ed4
Merge pull request #672 from rtCamp/feat/hot-reload
aryanjasala May 19, 2026
21265d1
chore: remove old eslint files
Swanand01 May 19, 2026
33d2deb
fix: eslint config
Swanand01 May 19, 2026
879643a
chore: update .gitignore
Swanand01 May 19, 2026
6cc98f0
fix: remove ecmaVersion
Swanand01 May 19, 2026
97fae5e
fix: update eslint version
Swanand01 May 19, 2026
fa46e50
fix: remove unused dep
Swanand01 May 20, 2026
5653c98
feat: add source dir
Swanand01 May 20, 2026
15c8af7
Merge branch 'theme-elementary-v2' into feat/tailwind-support
Swanand01 May 20, 2026
f92ccc6
chore: format
Swanand01 May 20, 2026
7003b70
Merge branch 'theme-elementary-v2' into fix/eslint-workflow
Swanand01 May 20, 2026
193f07e
chore: add package-lock
Swanand01 May 20, 2026
ef64a66
Merge pull request #687 from rtCamp/fix/eslint-workflow
aryanjasala May 21, 2026
b35ac49
chore: update docs
Swanand01 May 25, 2026
9c2cfa4
Merge branch 'theme-elementary-v2' into feat/tailwind-support
Swanand01 May 25, 2026
b5183c9
chore: add package-lock
Swanand01 May 25, 2026
151a4bb
fix: turn ghostMode off
Swanand01 May 25, 2026
2c09222
Merge pull request #690 from rtCamp/fix/browsersync-ghost-mode
aryanjasala May 25, 2026
c59f218
Merge pull request #686 from rtCamp/feat/tailwind-support
aryanjasala May 25, 2026
ad6eab5
refactor: add _tailwind-theme.css to gitignore
Swanand01 May 25, 2026
e31821c
fix: remove tailwind and deps
Swanand01 May 25, 2026
47cf741
chore: add docs
Swanand01 May 25, 2026
6b2937d
Merge pull request #691 from rtCamp/fix/tailwind-theme-file
Swanand01 May 26, 2026
0e845bd
Migrate Theme Elementary to adopt rtcamp/wp-framework package
pratik-londhe4 May 26, 2026
e663231
Fix formatting in Main.php
pratik-londhe4 May 27, 2026
32c9a68
Merge pull request #693 from rtCamp/feat/spacing-fix
aryanjasala May 27, 2026
6a6426c
feat: update theme.json to v3
Swanand01 May 28, 2026
7867b3b
feat: update deps in package .json
Swanand01 May 28, 2026
6802de7
fix: add the import resolver ts dep
Swanand01 May 28, 2026
2b2aa50
fix: revert the ranges
Swanand01 May 29, 2026
2f56374
fix: remove ranges from overrides
Swanand01 May 29, 2026
3abca1c
fix: remove deprecated plugin
Swanand01 May 29, 2026
2927aed
fix: update WP requirement ot at least 6.6
Swanand01 May 29, 2026
7376359
Merge pull request #695 from rtCamp/feat/update-versions
Swanand01 May 29, 2026
1d37072
fix: regenerate package-lock
Swanand01 May 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Local site hostname (without protocol or trailing slash).
# LocalWP: elementary.local, Lando: yoursite.lndo.site, wp-env: localhost, WP Studio: localhost
WP_HOST=yoursite.local

# BrowserSync port. Default: 3000. Change if port 3000 is already in use.
# If you change this, also define ELEMENTARY_THEME_BROWSER_SYNC_URL in wp-config.php
# so PHP enqueues the client script from the correct port.
BS_PORT=3000

# SSL cert paths — only needed when your local site runs on HTTPS.
# LocalWP stores certs at:
# macOS: ~/Library/Application Support/Local/run/router/nginx/certs/<domain>.key / .crt
WP_SSL_KEY=/path/to/yoursite.local.key
WP_SSL_CERT=/path/to/yoursite.local.crt
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc

This file was deleted.

29 changes: 29 additions & 0 deletions .github/actions/setup-node-with-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Setup Node with Cache'
description: 'Sets up Node.js and caches node_modules'

runs:
using: 'composite'
steps:
- name: Setup Node
uses: actions/setup-node@v6.2.0
with:
node-version-file: '.nvmrc'

- name: Get node version
id: node
run: echo "version=$(node -v)" >> $GITHUB_OUTPUT
shell: bash

- name: Cache node_modules
id: node_modules
uses: actions/cache@v5.0.3
with:
path: '**/node_modules'
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json', '**/.npmrc') }}-${{ steps.node.outputs.version }}

- name: Install Node dependencies
if: steps.node_modules.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
shell: bash
env:
CI: true
160 changes: 65 additions & 95 deletions .github/workflows/test-measure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ jobs:
name: 'Pre run'
runs-on: ubuntu-latest
outputs:
changed-file-count: ${{ steps.determine-file-counts.outputs.count }}
changed-css-count: ${{ steps.determine-file-counts.outputs.css-count }}
changed-js-count: ${{ steps.determine-file-counts.outputs.js-count }}
changed-php-count: ${{ steps.determine-file-counts.outputs.php-count }}
changed-gha-workflow-count: ${{ steps.determine-file-counts.outputs.gha-workflow-count }}

steps:
- name: Checkout including last 2 commits
Expand Down Expand Up @@ -64,92 +62,84 @@ jobs:
CSS_FILE_COUNT=$(node .github/bin/determine-modified-files-count.js ".+\.s?css|package\.json|package-lock\.json" "$MODIFIED_FILES")
JS_FILE_COUNT=$(node .github/bin/determine-modified-files-count.js ".+\.(js|snap)|package\.json|package-lock\.json" "$MODIFIED_FILES")
PHP_FILE_COUNT=$(node .github/bin/determine-modified-files-count.js ".+\.php|composer\.(json|lock)|phpstan\.neon\.dist" "$MODIFIED_FILES")
GHA_WORKFLOW_COUNT=$(node .github/bin/determine-modified-files-count.js "(\.github\/workflows\/.+\.yml)" "$MODIFIED_FILES")
GHA_WORKFLOW_COUNT=$(node .github/bin/determine-modified-files-count.js "(\.github\/(workflows|actions)\/.+\.yml)" "$MODIFIED_FILES")

echo "Changed file count: $MODIFIED_FILES_DATA"
echo "Changed CK theme CSS file count: $CSS_FILE_COUNT"
echo "Changed CK theme JS file count: $JS_FILE_COUNT"
echo "Changed CK theme PHP file count: $PHP_FILE_COUNT"
echo "Changed GHA workflow count: $GHA_WORKFLOW_COUNT"

echo "::set-output name=count::$MODIFIED_FILES_DATA"
echo "::set-output name=css-count::$CSS_FILE_COUNT"
echo "::set-output name=js-count::$JS_FILE_COUNT"
echo "::set-output name=php-count::$PHP_FILE_COUNT"
echo "::set-output name=gha-workflow-count::$GHA_WORKFLOW_COUNT"
echo "Changed ${{ github.event.repository.name }} CSS file count: $CSS_FILE_COUNT"
echo "Changed ${{ github.event.repository.name }} JS file count: $JS_FILE_COUNT"
echo "Changed ${{ github.event.repository.name }} PHP file count: $PHP_FILE_COUNT"
echo "Changed GHA workflow/actions count: $GHA_WORKFLOW_COUNT"

echo "css-count=$CSS_FILE_COUNT" >> $GITHUB_OUTPUT
echo "js-count=$JS_FILE_COUNT" >> $GITHUB_OUTPUT
echo "php-count=$PHP_FILE_COUNT" >> $GITHUB_OUTPUT
env:
# Ignore Paths:
# - .github/
# - !.github/workflows
# - !.github/actions
# - .wordpress-org/
# - docs/
IGNORE_PATH_REGEX: \.github\/(?!workflows)|\.wordpress-org\/|docs\/
IGNORE_PATH_REGEX: \.github\/(?!workflows)(?!actions)|\.wordpress-org\/|docs\/

- name: Summarize skipped jobs
run: |
SKIPPED=()

[[ "${{ steps.determine-file-counts.outputs.css-count }}" -le 0 ]] && SKIPPED+=("lint-css")
[[ "${{ steps.determine-file-counts.outputs.js-count }}" -le 0 ]] && SKIPPED+=("lint-js" "unit-tests-js" "build-prod")
[[ "${{ steps.determine-file-counts.outputs.php-count }}" -le 0 ]] && SKIPPED+=("lint-php")

if [[ ${#SKIPPED[@]} -gt 0 ]]; then
echo "The following jobs will be skipped as no relevant files were changed:"
for JOB in "${SKIPPED[@]}"; do
echo " - $JOB"
done
else
echo "All jobs will run."
fi

lint-css:
needs: pre-run
if: needs.pre-run.outputs.changed-css-count > 0 || needs.pre-run.outputs.changed-gha-workflow-count > 0
if: needs.pre-run.outputs.changed-css-count > 0
name: 'Lint CSS'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6.2.0
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install Node dependencies
run: npm ci --ignore-scripts
env:
CI: true
- name: Setup Node with cache
uses: ./.github/actions/setup-node-with-cache

- name: Detect coding standard violations (stylelint)
run: npm run lint:css

lint-js:
needs: pre-run
if: needs.pre-run.outputs.changed-js-count > 0 || needs.pre-run.outputs.changed-gha-workflow-count > 0
if: needs.pre-run.outputs.changed-js-count > 0
name: 'Lint JS'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6.2.0
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install Node dependencies
run: npm ci --ignore-scripts
env:
CI: true
- name: Setup Node with cache
uses: ./.github/actions/setup-node-with-cache

- name: Detect coding standard violations (eslint)
run: npm run lint:js

unit-tests-js:
needs: pre-run
if: needs.pre-run.outputs.changed-js-count > 0 || needs.pre-run.outputs.changed-gha-workflow-count > 0
if: needs.pre-run.outputs.changed-js-count > 0
name: 'Run JS unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6.2.0
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install Node dependencies
run: npm ci --ignore-scripts
env:
CI: true
- name: Setup Node with cache
uses: ./.github/actions/setup-node-with-cache

- name: Run unit tests
run: npm run test:js
Expand All @@ -158,7 +148,7 @@ jobs:

lint-php:
needs: pre-run
if: needs.pre-run.outputs.changed-php-count > 0 || needs.pre-run.outputs.changed-gha-workflow-count > 0
if: needs.pre-run.outputs.changed-php-count > 0
name: 'Lint PHP'
runs-on: ubuntu-latest
steps:
Expand All @@ -171,10 +161,11 @@ jobs:
php-version: '8.2'
coverage: none
tools: cs2pr
github-token: ${{ secrets.WP_FRAMEWORK_REPO_TEMP_TOKEN }}

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Configure Composer cache
uses: actions/cache@v5.0.3
Expand All @@ -183,6 +174,10 @@ jobs:
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Ensure git is installed
run: which git || (sudo apt-get update && sudo apt-get install -y git)

- name: Install Composer dependencies
run: composer install --prefer-dist --optimize-autoloader --no-progress --no-interaction --no-scripts

Expand All @@ -192,66 +187,41 @@ jobs:
- name: Detect coding standard violations (PHPCS)
run: vendor/bin/phpcs -q --report=checkstyle --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 | cs2pr --graceful-warnings

unit-test-php:
name: "PHP Unit test"
runs-on: ubuntu-latest
build-prod:
needs: pre-run
if: needs.pre-run.outputs.changed-js-count > 0 || needs.pre-run.outputs.changed-css-count > 0
name: 'Build production'
runs-on: ubuntu-latest
steps:
# Note: The repeated `needs.pre-run.outputs.changed-php-count > 0` checks would be avoided if a step could short-
# circuit per <https://github.com/actions/runner/issues/662>. The reason why the if statement can't be put on the
# job as a whole is because the name is variable based on the matrix, and if the condition is not met then the
# name won't be interpolated in order to match the required jobs set up in branch protection.
- name: Notice
if: needs.pre-run.outputs.changed-php-count > 0
run: echo "No PHP files were changed in CK theme so no PHP unit tests will run"

- name: Checkout
if: needs.pre-run.outputs.changed-php-count > 0
uses: actions/checkout@v6

- name: Setup Node
if: needs.pre-run.outputs.changed-php-count > 0
uses: actions/setup-node@v6.2.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: Setup Node with cache
uses: ./.github/actions/setup-node-with-cache

- name: Install Node dependencies
if: needs.pre-run.outputs.changed-php-count > 0
run: npm ci --ignore-scripts
- name: Build production
id: build
run: npm run build:prod
env:
CI: true

- name: Start WP environment
if: needs.pre-run.outputs.changed-php-count > 0
run: npm run wp-env start

- name: Run tests
if: ${{ needs.pre-run.outputs.changed-php-count > 0 }}
run: npm run test:php

build-prod:
unit-test-php:
needs: pre-run
if: needs.pre-run.outputs.changed-js-count > 0 || needs.pre-run.outputs.changed-gha-workflow-count > 0 || needs.pre-run.outputs.changed-css-count > 0
name: 'Build production'
if: needs.pre-run.outputs.changed-php-count > 0
name: 'PHP Unit test'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node
uses: actions/setup-node@v6.2.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: Setup Node with cache
uses: ./.github/actions/setup-node-with-cache

- name: Install Node dependencies
run: npm ci --ignore-scripts
env:
CI: true
- name: Start WP environment
run: npm run wp-env start

- name: Build production
id: build
run: npm run build:prod
env:
CI: true
- name: Configure Composer GitHub auth in wp-env
run: npx wp-env run cli -- composer config --global github-oauth.github.com "${{ secrets.WP_FRAMEWORK_REPO_TEMP_TOKEN }}"

- name: Run tests
run: npm run test:php
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# macOS/IDE
.DS_Store
.idea
.vscode

# Log files
*.log
Expand All @@ -17,6 +18,7 @@

# Enviroment
.env
.env.local
.wp-env.override.json

# Build
Expand All @@ -27,3 +29,6 @@ phpcs.xml

# Cache
.phpunit.result.cache

# Tailwind theme
_tailwind-theme.css
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/assets/build/*.css
/tests
/vendor
**/*.md
Loading