A Wordpress scaffolding theme with Gulp, Timber and Twig
- Twig templating engine
- Timber starter theme to support Twig
- SASS 7-1 Architecture system
- Gulp task runner
- Symlink Abstraction for easy theme customization
- Full automated scaffolding system from CLI
- Extensive test sample data easily imported
- WP-CLI dependency check
- e2e testing with phpUnit and Mocha framework
- Centralized custom plugin(s) dir to dynamically register in theme
- Abstraction of admin template for easy customization
You do not need any files or directories for this system to run except:
- /bin
These scripts will bring in the latest version of Wordpress and Timber into your local environment.
Simply navigate to the root dir of the repo and run:
./bin/scaffold.sh
If you have already customized the site or want to bring in a compliant CSS theme or JS assets that is fine. The scaffolder checks for CSS and JS dirs in the root install before creating new ones to allow for modular migrations and sharing of assets between multiple WP_Twig instances.
Make sure to have your apache instance and host set up to be able to install the WP instance before continuing in scaffold.sh
The file permissions and hardening of Wordpress are not required. You can choose 'n' for these. Use at your own caution as they create .htaccess files across multiple dirs and reset your file permission in order to make WP more secure.
I chose to write the FED asset scaffolding in BASH as this is strictly a starter/scaffolding system. If you don't want Gulp or the modules intended then remove the frontend.sh call in scaffold.sh or keep and then configure the files as needed for your repo. The goal was to keep the system as minimal as possible till executed.
- gulp live-build Executes watch on img, js, sass files while also serving a local browser instance through proxy
- gulp light-build Compiles JS and CSS but does not minify images
- gulp full-build Compiles JS, CSS, and optimizes images in the system