WordPress CLI Theme Generator

article image

This project is a command line tool that I created to help me bootstrap WordPress projects quickly.

The theme itself is a cross between https://underscores.me theme mixed with the folder structure of https://jointswp.com with an augmented Gulp process taken from https://github.com/ahmadawais/WPGulp.

Installed globally you can then run the command create-theme and you will be presented with two options, WordPress or WooCommerce. You can then give the theme a name and initialise with git and install dependencies if you want.

The program will create the files with your theme name in all necessary files and copy them to the new theme directory.

It will also setup the necessary parameters for gulp using a .json file and replacing the placeholders with the themename including the proxy for the live reload. I work within Flywheel so I match my Flywheel name to my theme so the proxy is the same.

The WordPress template includes a medium.com style blog single page and a clean mobile responsive menu. I feel these two things can be standardised so having these setup ready is such a time saver.

When the theme is finished installing I use the node notifier package to use the inbuilt notification centre to tell me all is done.

Future updates for the CLI will include plugin structures and of course a gulp setup and more in-depth look at the theme in general for the WooCommerce template.