WordPress Yeoman Generator and Grunt script

Wordpress Yeoman generator

Posted on March 4, 2014

I’ve been looking at automating my workflow lately so I’ve built a Yeoman Generator for WordPress which includes a grunt script for minimising CSS/JS and compressing images.

The Generator will

  • Copy the package.json and Gruntfile.js to root folder
  • Create your WordPress database
  • Download and unzip latest WordPress version into root
  • Delete preinstalled themes if adding a third part theme
  • Download / install a third party theme and rename as specified
  • Rename the TwentyFourteen theme to a name of choice if no third party themes are installed
  • Download Advanced Custom Fields and move to plugins folder if requested
  • Move wp-config file to root and update DB details. wp-config also includes environment detection
  • Update theme name in stylesheet
  • Set current theme in Database

The Grunt script will

  • Minimise/Concatenate CSS
  • Minimise/Concatenate Javascript
  • Compress Images
  • Copy all files to a dist folder for deployment.

You can download/install the Yeoman Wordpress  generator here

You can also download the Yeoman Wordpress generator directly from github if you want it modify it for your own needs.