Friday, 15 June 2018

Jump start WordPress projects with WP CLI Scaffolding


As a developer, I find I do a lot of the same things on a regular basis. I may set up a new plugin, start a new theme, add a specific feature to a theme or plugin, set up tests, or other repetitive tasks. These tasks usually share a similar starting point, even if the end result is different. Scaffolding for WP CLI makes it easy to jump start projects by quickly performing some of these repetitive tasks. For example, a plugin will usually have certain files and folders like:
/plugin-name
plugin-name.php
readme.md (or .txt)
assets
js
css
Images
inc
classes
functions
tests
Almost every plugin I build starts like that. I’ve even made a plugin template so I can build those out, then go in and change a few file names before starting to build the plugin. It saves a good bit of time, but it’s also something that requires finding my template, copying the template, and editing certain files in the template so it’s ready to use.
That’s faster than typing all of those things out manually, but the process can be simplified even more.
Scaffolding
Before I started full time development I worked in construction and set up scaffolds on a regular basis. If you walk down a typical
Source: https://managewp.org/articles/17528/jump-start-wordpress-projects-with-wp-cli-scaffolding



source https://williechiu40.wordpress.com/2018/06/15/jump-start-wordpress-projects-with-wp-cli-scaffolding/

No comments:

Post a Comment