https://github.com/horttcore/wordpress-theme-boilerplate
A WordPress Boilerplate Theme
https://github.com/horttcore/wordpress-theme-boilerplate
boilerplate boilerplate-template theme wordpress
Last synced: 4 months ago
JSON representation
A WordPress Boilerplate Theme
- Host: GitHub
- URL: https://github.com/horttcore/wordpress-theme-boilerplate
- Owner: Horttcore
- Created: 2016-05-09T13:37:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-10-02T22:33:09.000Z (about 3 years ago)
- Last Synced: 2024-06-12T19:10:07.998Z (over 1 year ago)
- Topics: boilerplate, boilerplate-template, theme, wordpress
- Language: PHP
- Homepage: https://horttcore.de
- Size: 3.87 MB
- Stars: 3
- Watchers: 2
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Aurora Theme
[](https://github.com/ralfhortt/wordpress-theme-boilerplate/actions/workflows/php.yml)
[](https://github.com/ralfhortt/wordpress-theme-boilerplate/actions/workflows/lint.yml)
## 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
- `npm run make:block` – Interactive prompt to create a new block in `src/theme/blocks/`. Generates `block.json`, `edit.tsx`, `index.tsx`, and `save.tsx` from stubs.
- `npm run make:style` – Interactive prompt to create a new block style JSON in `src/theme/blocks/`.
- `npm run make:block-config` – Interactive prompt to create a new block configuration JSON in `src/theme/blocks/`.
- `npm run build:theme` – Builds the `theme.json` file from `src/theme/` and copies block style JSON files to the `styles` folder.
### Hot Module Reloading
For a fast development workflow, hot module reloading (HMR) is enabled via `wp-scripts`:
- Run `npm run start`
This starts the development server with HMR for JS, TS, and SCSS files. Changes are automatically reflected in the browser without a full reload.
### Linters
- **PHP:**
- Lint: `npm run lint:php` (runs PHPStan)
- Format: `npm run lint:php:fix` (runs Pint)
- **JavaScript/TypeScript:**
- Lint: `npm run lint:js` (if configured)
- Format: `npm run lint:js:fix` (if configured)
- **CSS/SCSS:**
- Lint: `npm run lint:css`
- Format: `npm run lint:css:fix`
You can also run all linters with `npm run lint` (if configured).
### Fixers
- **PHP:**
- Format code using [Laravel Pint](https://laravel.com/docs/10.x/pint):
`composer run format`
- **CSS/SCSS:**
- Auto-fix with Stylelint:
`npm run lint:css:fix`
- **JavaScript/TypeScript:**
- Auto-fix with ESLint (if configured):
`npm run lint:js:fix`
### Code Formatting
Use [Laravel Pint](https://laravel.com/docs/10.x/pint) to automatically format PHP code:
```sh
composer run format
```
You can customize Pint's rules by adding a `pint.json` or `pint.json5` configuration file to your project root.
### Code Upgrades
Run Rector to automatically upgrade and refactor PHP code:
```sh
composer run rector
```
See [Rector documentation](https://getrector.com/docs/) for configuration and usage details.