Wpify Plugin Skeleton
The boilerplate is written as a plugin, that registers the theme directory. The reason for this design is that I had in the past several multi-site projects, that shares the same functionality, but sites have different themes. Splitting functionality and themes provides the best solution. Themes should take care only about templates, not a functionality.
Another idea is splitting the functionality into self-contained classes. We want to prevent a spaghetti code and have the related code together.
The build process utilizes the PostCSS, Autoprefixer, SCSS so that you can use all the modern possibilities you can imagine. For example, full support of CSS grid. You can also use CSS modules, ES2020 syntax, async/await, import(), etc.
Build process is also prepared to React, feel free to try it ;)
The boilerplate uses composer (for dependencies and PHP autoloading), Yarn (for managing dependencies for front-end), Webpack (to build the assets).
wp-content/plugins/wpify
wp-content/plugins/wpify
composer install
, yarn install
and yarn build
yarn start
command