ralfhortt/wordpress-theme-boilerplate

There is no license information available for the latest version (dev-master) of this package.

A WordPress Boilerplate Theme by Ralf Hortt

Installs: 31

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 5

Open Issues: 2

Type:wordpress-theme

pkg:composer/ralfhortt/wordpress-theme-boilerplate

dev-master 2025-10-22 12:53 UTC

README

Documentation

Every folder contains a README.md with further instructions

Installation

$ composer create-project ralfhortt/wordpress-theme-boilerplate Check INSTALLATION.md for detailed installation steps

Development

Commands

Development Helpers

  • npm run make:block / composer run make:block to interactively create a new json file for a block in src/theme/blocks/blockname.
  • npm run make:style to interactively create a block style in src/theme/namespace/blockname.
  • npm run make:block-style / composer run make:block-style to interactively create a block style.
  • npm run make:pattern / composer run make:pattern to interactively create a block pattern.
  • npm run css:clamp / composer run css:clamp to calculate CSS clamp values for responsive design based on viewport sizes.
  • npm run css:color / composer run css:color to show a color in different notations (i.e. rgb hex oklch …)
  • npm run css:contrast / composer run css:contrast to calculate color contrast ratios and accessibility compliance.

Build Commands

  • npm run build:theme to build the theme.json file from src/theme/ and copying the block styles to styles folder
  • npm run watch:theme to watch and auto-rebuild theme files during development

Build Process

Production

  • Run npm run build for production build

Development

  • Run npm run start

Linters

  • npm run lint:css / composer run lint:css - Run stylelint for CSS/SCSS files
  • npm run lint:php / composer run lint:php - Run PHP linters (phpcs, phpmd)
  • composer run lint - Run PHPStan static analysis

Available linters:

Fixers

  • npm run lint:css:fix / composer run lint:css:fix - Auto-fix stylelint issues
  • npm run lint:php:fix / composer run lint:php:fix - Auto-fix PHP formatting with phpcbf
  • composer run format - Format PHP code with Laravel Pint
  • composer run format:prettier - Format files with Prettier

Available fixers:

Project Setup

  • composer run replace-textdomain - Replace textdomain placeholders with project name
  • composer run copy-env - Copy environment configuration files