Starter for classic PHP WordPress theme. Based on the workflow suggested by Andy Bell's https://buildexcellentwebsit.es/.
Edit CSS and JS in _resources
. Fonts and images in assets
.
For production run production build and upload in your theme folder:
- assets
- core
- css
- js
- template-parts
- Wordpress PHP files
- screenshot.jpg
- style.css
- npm install
Creates a dev server (browser-sync) with hot reload on localhost:3000, pointing to the domain created by LocalWP. The domain (eg "wp-excellent.local", "localhost:10028", etc.) must correspond to the "site host" created by Local. Change both occurrences of "localhost:10028" in the scripts
section of package.json
:
"browser-sync": "browser-sync start --proxy \"localhost:10028\" --host=\"localhost:10028\" --no-inject-changes --files=\"./\"",
I might change that in the future, as LocalWP now offers hot reload out of the box. But for now it only watches wp-content/plugins and wp-content/themes for changes to .css files.
npm start
npm run production
Andy Bell Andy recently came up an approach that incorporates Tailwind CSS into his methodology.
Heydon Pickering I really like Heydon's approaches and recommend reading his books.
Tailwind