- Webpack 12+ with Browersync
- SCSS with Bootstrap 5 and autoprefixer
- JS ECMA5+, support React
- phpcs, composer
- Coding standards: StandardJS, follow BEMCSS rules
Requires
- Webpack 12+
- Composer
- VS Code with .editorconfig extensions
If you clone this template, it's better if you change some code:
- PHP function with prefix
wp_theme_
toyour_theme_prefix_
, for example:ct_media_
, in phpcs.xml and some strings in PHP files - Change text domain from
wp-theme
toyour-theme-prefix
- Find
WP_THEME_
and replace withYOUR_THEME_PREFIX_
To start working with your local domain environment, please setup a local domain, such as codetot.test
. Don't use localhost/your-sub-dir/
.
Steps
- Edit local domain at
webpack.config.js
- Run command
npm install
- Run command
composer install
Command
- Run command
npm run dev
, then it will openhttp://localhost:3000
which points to your real domain inwebpack.config.js
Command
- Run command
npm run build
to minify and compress assets.
Command
- Run
npm run test
(mostly this feature was on CI) to test assets. - Run
npm run fix
to automatically fix CSS + JS code standards