Just wondering who else is using Grunt for WordPress Theme Development?
I’ve been avoiding grunt for WordPress themes up until today, it’s quite cool. When I run grunt build
it does the following:
- Copy my theme files from
/theme-name/
into/build/
- Zips up
/theme-name-child/
into/theme-name-child.zip
- Minify all javascript in
/build/
- Compresses all images in
/build/
- Adds new version numbers to
/build/style.css
(Theme Version) and/build/functions.php
(enqueue script/style version numbers) - Adds correct textdomain to all function calls within
/build/*.php
files - Generates
/build/languages/theme-name.pot
- Zips up each of my custom theme plugins from
/plugin-dev/theme-plugin-name/
into/build/plugins/theme-plugin-name.zip
(so they can be activated with TGM upon theme installation) - Finally zips up
/build/
folder into/theme-name.1.4.2.zip
Things I’m trying to figure out now are:
- How to automatically add my
/plugin-dev/*
theme plugins to the TGM activation options array within the theme. So if I make a new theme plugin in/plugin-dev/
it will be automatically added to the TGM config array. - Best way to deploy my
theme-name-1.4.2.zip
file to a fresh WordPress installation for a quick test.
Anyone else here have a gruntfile they would like to share?
Cheers,
Dave