- 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-themetoyour-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:3000which points to your real domain inwebpack.config.js
Command
- Run command
npm run buildto minify and compress assets.
Command
- Run
npm run test(mostly this feature was on CI) to test assets. - Run
npm run fixto automatically fix CSS + JS code standards