IIS Start is a bare-minimum starter theme for WordPress. The goal is to reduce startup time when developing new themes and to keep the themes consistent in terms of code style, build/bundling tools and testing.
Start by reading this README that contains sections on how to get started, development workflow and coding conventions.
- Docker or Vagrant (optional)
- Git
- Composer
- Npm/Node
- Clone the repo
- Replace all instances of "IIS Start", see replacements below
- Update style.css
- Copy
.env-sample
to.env
and make necessary changes. - Run
composer install
to setup WordPress. - Install client dependencies
npm install
- Run
npm run production
to build css and javascript files
Do a "search & replace" (case sensitive) on the following:
'iis-start'
to'my-theme'
iis_start_
tomy_theme_
for function namesiis-start-
tomy-theme-
for prefixed handlesIIS Start
toMy Theme
for namesiis-start
(without quotes) tomy-theme
for text-domain and css namespace
We've provided support for both Docker and Vagrant right out of the box. You can of course use your own environment. Make sure it meets the WordPress requirements.
We use Webpack for bundling with Laravel Mix on top for an simpler API and less configuration.
- Start developing with
npm start
.
npm start
watches scripts and styles, compiles/transpiles them with Vite.
A dev server is started on localhost:5173
(or VITE_PORT
in your .env file) that serves your js and css with hot reload.
Before pushing any code make sure that the code follows the IIS Coding Conventions.
npm run eslint
npm run stylelint
Or all at once with npm run lint
.
PHP can be linted with composer test
. You can also use composer php-fix
to auto-fix issues, and composer php-blame
to see code sniffer summary for all contributors.
When deploying to production you should use npm run production
instead of npm start
to produce production-ready bundles.